How tweepy can be install in lab

Hiii,
i am not able to install tweepy for twitterAPI…i m getting an unexpected error as follows:

File “/home/singhsadhana9459057/tweet/venv/build/tweepy/setup.py”, line 17, in
install_reqs = parse_requirements(‘requirements.txt’, session=uuid.uuid1())
TypeError: parse_requirements() got an unexpected keyword argument ‘session’

Cleaning up…
Command python setup.py egg_info failed with error code 1 in /home/singhsadhana9459057/tweet/venv/build/tweepy
Storing complete log in /home/singhsadhana9459057/.pip/pip.log

please suggest me how can i do this…thakns in advance

Hi @Sadhana_Singh,

I followed these steps to install tweepy

1.Create test directory

mkdir abhinav_test

2.Configure virtual environment

cd abhinav_test && virtualenv venv

3.Activate the virtual environment

source venv/bin/activate

4.Install tweepy

pip install tweepy

Hope this helps

1 Like

hello sir,
i am running the same code but it is still giving the same error as follows:

[singhsadhana9459057@ip-172-31-20-58 test_s]$ virtualenv venv
New python executable in venv/bin/python
Installing Setuptools…
…done.
Installing Pip…
…done.
[singhsadhana9459057@ip-172-31-20-58 test_s]$ source venv/bin/activate
(venv)[singhsadhana9459057@ip-172-31-20-58 test_s]$ pip install tweepy
Downloading/unpacking tweepy
Downloading tweepy-3.5.0.tar.gz
Running setup.py egg_info for package tweepy
Traceback (most recent call last):
File “”, line 16, in
File “/home/singhsadhana9459057/test_s/venv/build/tweepy/setup.py”, line 17, in
install_reqs = parse_requirements(‘requirements.txt’, session=uuid.uuid1())
TypeError: parse_requirements() got an unexpected keyword argument ‘session’
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 16, in
File “/home/singhsadhana9459057/test_s/venv/build/tweepy/setup.py”, line 17, in
install_reqs = parse_requirements(‘requirements.txt’, session=uuid.uuid1())
TypeError: parse_requirements() got an unexpected keyword argument ‘session’

Cleaning up…
Command python setup.py egg_info failed with error code 1 in /home/singhsadhana9459057/test_s/venv/build/tweepy
Storing complete log in /home/singhsadhana9459057/.pip/pip.log

please suggest me if i’m wrong …thanks

Hi @Sadhana_Singh,

There are two solutions

1.Install tweepy 2.3.0 in your virtual environment…It should work

pip install tweepy==2.3.0

2.We already have tweepy in anaconda packages. You can import that.

export PATH=/usr/local/anaconda/bin:$PATH
python
import tweepy