1

I installed Tweepy 3.5.0 from the command line using both:

easy install tweepy

And later:

pip install tweepy

After uninstalled.

And it successfully installed in C:\python27\lib\site-packages.


I'm using Python 2.7.1 in iPython Notebook. When I run:

import python

I get the following error:

No module named tweepy 

Is Tweepy installed in the wrong path?

Remi Guan
  • 21,506
  • 17
  • 64
  • 87
  • Don't you want to import tweepy (not import python)? And, you mention ipython notebook specifically. Are you getting different results in ipython notebook compared to at the command line? – SPKoder Jan 26 '16 at 04:04
  • Here, I sketch the problem you see: It's the same for `python` and `ipython` http://stackoverflow.com/questions/32680081/importerror-after-successful-pip-installation The key is to find out to which interpreter `ipython` belongs and install `tweepy` exactly to that interpreter. – cel Jan 26 '16 at 04:19

1 Answers1

0

It seems pip not installed properly, therefore please follow up the below steps and share the feedback.

C:\>pip install tweepy

The first command is enough provided that pip has been added to the Path environment variable of your system. To check it out, do this:

    Open Command Prompt (DOS prompt).
    Type python and press enter.
    Once python prompt (>>>) appears, type import pip and press enter.

If you see an error, then pip has not been added to the environment variable Path. If there's no error whatsoever, then pip is installed properly.

In that case, re-install Python once and try again. I am using Python 3.5 and tweepy works fine for me. I see that you are using Python 2.7.1 version. I hope Python has been properly installed. If you want, try uninstalling Python and then re-installing it properly just to make sure. I will also suggest you to try using Python 3.x version once to see if you get the same error.