user2237511
user2237511

Reputation: 1149

Error installing tweepy on windows

I am new to Python and tweepy. I have tried searching for an answer but haven't been able to get this working.

I have Java 6 (can't change to 7, for another project), python 2.7 and I have downloaded and extracted tweepy in my C drive.

Java and python are both in the PATH variables. I am trying to install tweepy and I keep getting this error.

C:\>cd C:\tweepy

C:\tweepy>python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>setup.py build
  File "<stdin>", line 1
    setup.py build
                 ^
SyntaxError: invalid syntax
>>> setup.py install
  File "<stdin>", line 1
    setup.py install
                   ^
SyntaxError: invalid syntax
>>>

Where am I going wrong? Is it a configuration issue?

Upvotes: 3

Views: 14764

Answers (4)

parisa
parisa

Reputation: 101

I had the same problem. Despite the fact that I had already installed tweepy using pip install tweepycommand I was getting the "unable to import tweepy error".

I tried installing tweepy.asynchronous by running the following command and everything got fixed.

pip install tweepy[async]

Upvotes: 1

Blasanka
Blasanka

Reputation: 22477

You can also clone the git repo and do the following:

git clone git://github.com/tweepy/tweepy.git
cd tweepy
python setup.py install

Note: I assumed, you have added python to your PATH variable(if windows: https://www.pythoncentral.io/add-python-to-path-python-is-not-recognized-as-an-internal-or-external-command/)

Upvotes: 1

Jo&#227;o Pinela
Jo&#227;o Pinela

Reputation: 127

another way is to use pip (if you have it installed). run

pip install tweepy

it should work just fine then.

Upvotes: 6

Nurul Akter Towhid
Nurul Akter Towhid

Reputation: 3246

  1. download tweepy and unzip it in Desktop: https://github.com/tweepy/tweepy

2.rename it tweepy

  1. open command prompt and type "cd desktop" then "cd tweepy"

  2. type "python setup.py install" enter image description here

Upvotes: 2

Related Questions