I am having problems with importing tweedy:
this is the error received
Traceback (most recent call last):
File "star_twitter.py", line 71, in <module>
send_to_twitter(get_price())
File "star_twitter.py", line 9, in send_to_twitter
import tweepy
ImportError: No module named tweepy
I tried re-installing it but now am receiving the following error message
Downloading/unpacking tweepy
Downloading tweepy-3.3.0.tar.gz
Running setup.py egg_info for package tweepy
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/pi/build/tweepy/setup.py", line 17, in <module>
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 "<string>", line 14, in <module>
File "/home/pi/build/tweepy/setup.py", line 17, in <module>
install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
TypeError: parse_requirements() got an unexpected keyword argument 'session'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/pi/build/tweepy
Storing complete log in /root/.pip/pip.log
Your assistance will be appreciated
You may have faced known problem. Try upgrading pip.
sudo pip install --upgrade pip
The fact that you're using virtualenv does help. If you used sudo trying to install tweepy then that's where the installation went wrong.
Try using pip install tweepy only.
If you're still getting an error from that then your virtualenv has probably became corrup. Do the following:
$ deactivate
$ rmvirtualenv nlmanagement
$ mkvirtualenv nlmanagement
$ pip install -r requirements.txt
Try the pip installation first and only use that for future needs in virtualenv.
Related
I am getting an error while trying pip install DAG packcage.
Error
Collecting DAG
Using cached https://files.pythonhosted.org/packages/e1/92/ffc722ac557e3c180f8ec6cdad96d2731b981677529c263c3df04a656910/DAG-0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\setup.py", line 1, in <module>
from ez_setup import use_setuptools
File "C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\ez_setup.py", line 94
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ASHOK~1.EAP\AppData\Local\Temp\pip-install-4dybsujd\DAG\
How to fix this.
Try pip install py-dag, this will use https://github.com/thieman/py-dag
DAG, released in 2007. The code is Python2-only.
Try installing the module with Python 2.7. Or find a different, Python3-compatible module.
I'm to trying create a project in Python using Django. One of the dependencies is a connection with Mysql. I'm Using pip to import whatever I need.
My problem is the error when I run this line: sudo pip3 install mysql-python
The return is:
Collecting mysql-python
Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-6dok9yt5/mysql-python/setup.py", line 13, in <module>
from setup_posix import get_config
File "/tmp/pip-install-6dok9yt5/mysql-python/setup_posix.py", line 2, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
The final line is: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-6dok9yt5/mysql-python/
Someone can help me? Thanks in advance!
As far as I know "mysql-python" currently does not support python3
MySQL-3.23 through 5.5 and Python-2.4 through 2.7 are currently supported. Python-3.0 will be supported in a future release. PyPy is supported.
Maybe this will help:
https://stackoverflow.com/a/25724855/966660
I'm tring to install django-dbsettings with pip but it causes the following error:
Downloading django-dbsettings-0.7.4.tar.gz
Running setup.py egg_info for package django-dbsettings
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/path/virtualenv/build/django-dbsettings/setup.py", line 23, in <module>
packages=find_packages(include=['dbsettings']),
TypeError: find_packages() got an unexpected keyword argument 'include'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/path/virtualenv/build/django-dbsettings/setup.py", line 23, in <module>
packages=find_packages(include=['dbsettings']),
TypeError: find_packages() got an unexpected keyword argument 'include'
Also I'm using pip 1.0 and python 2.7.
How can I fix it?
There is no include keyword in find_packages() using older versions of setuptools, you need to upgrade:
pip install -U setuptools
I would also update pip.
When installing preppy in a virtualenv on my workstation (Ubuntu Linux) it works, but when installing it the same way on an instance of Amazon Linux I get an error like this:
(env)[ec2-user#server t]$ pip install preppy
Downloading/unpacking preppy
Downloading preppy-2.3.2.tar.gz (42kB): 42kB downloaded
Running setup.py (path:/home/ec2-user/t/env/build/preppy/setup.py) egg_info for package preppy
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/ec2-user/t/env/build/preppy/setup.py", line 13, in <module>
import preppy
File "/home/ec2-user/t/env/build/preppy/preppy.py", line 72, in <module>
isPy3 = sys.version_info.major == 3
AttributeError: 'tuple' object has no attribute 'major'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/ec2-user/t/env/build/preppy/setup.py", line 13, in <module>
import preppy
File "/home/ec2-user/t/env/build/preppy/preppy.py", line 72, in <module>
isPy3 = sys.version_info.major == 3
AttributeError: 'tuple' object has no attribute 'major'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/ec2-user/t/env/build/preppy
Storing debug log for failure in /home/ec2-user/.pip/pip.log
This hints at a problem when checking what the Python version is, but googling around did not help me this time.
I'm aware that python packages sometimes have dependencies on host software, eg to install psycopg2 I had to first install the Postgres development packages on the operating system.
So how do I fix this error?
Your ec2 instance needs to be running (at least) Python 2.7.
sys.version_info didn't become a named tuple until 2.7.
I am trying to migeate an app to the cedar-14 stack from cedar on Heroku. In my requirements.txt file I have:
....
robobrowser==0.5.1
....
When I try to deploy by pushing the project to heroku I get:
Collecting robobrowser==0.5.1 (from -r requirements.txt (line 17))
Downloading robobrowser-0.5.1.tar.gz
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-PqCF2A/robobrowser/setup.py", line 38, in <module>
for requirement in parse_requirements('requirements.txt')
File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-PqCF2A/robobrowser/setup.py", line 38, in <module>
for requirement in parse_requirements('requirements.txt')
File "/app/.heroku/python/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-PqCF2A/robobrowser
How can I fix this?
I ran into this problem installing wabbit_wappa for Python. I 'fixed' it by changing a line in setup.py from:
install_reqs = parse_requirements('requirements.txt')
to
install_reqs = parse_requirements('requirements.txt', session=False)
and it installed just fine.
There is an open issue and a pull request in the robobrowser's github issue tracker:
Updated requirements for pip 6.0+ to include a session
Either wait for it being merged, or install robobrowser from the fork:
$ pip install git+https://github.com/xxinfinityxx/robobrowser
Downgrading pip could also be an option, but I'm not sure if you have control over which pip version to use on heroku.
Try updating pip:
sudo pip install --upgrade pip
This fixed the problem for me.
I have the current newest version of pip, and this did it for me:
install_requirements = parse_requirements('requirements.txt', session=pip.download.PipSession())