quick thing: YES I KNOW THERE IS ANOTHER POST ON THIS, but its answers do NOT solve my issue.
So I installed this package called hangups on my raspberry pi. It ruined my pip installation and gave me the error below. However if you google this error, you will come to a post that does have a solution: re installing pip. I had done this several times; Once reinstalling pip from apt, 2nd time from get-pip.py, last by reinstalling python3. Irregardless, none of these methods solved my error (Oh and i also must mention that i did try the easy_install reinstallation of pip but that fails too). Nothing seems to work. My theory is that some repository somewhere is not updated because the error message points to some ancient version of pip (<= 2) (on my mac pip is at 9 running same version of python 3) and for some reason, pip has this dependency that isnt there just disables my pip binary. I would install them, but (lol) i dont have pip. The error is below. How do I fix this?
please comment if you need more information. Thanks!!!
/usr/local/lib/python3.4/dist-packages/requests/__init__.py:80:
RequestsDependencyWarning: urllib3 (1.22) or chardet (2.3.0) doesn't
match a supported version!
RequestsDependencyWarning)
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python3/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python3/dist-packages/pip/download.py", line 25, in <module>
from requests.compat import IncompleteRead
ImportError: cannot import name 'IncompleteRead'
Yeah ok so for future reference kids, easy_install does (like pip) have a python 3.x version. Just do sudo easy_install3 -U pip.
Related
Using OSX El Capitan. Just installed a bunch of pip module and was following a few online tutorials, must have broken something as now I get the following error whenever I try to use pip (although python seems to run fine).
$ pip install pandas
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2837, in <module>
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 451, in _build_master
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 464, in _build_from_requirements
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 639, in resolve
pkg_resources.DistributionNotFound: pip==1.5.6
Any helping fixing would be much appreciated.
Thanks.
Reinstall using easy_install. Close the terminal and reopen. Pip should now work.
Try updating pip first by typing pip install -U pip and the try pip install pandas. I myself use Anaconda/Miniconda. Most of the packages are well handled and the dependencies are taken care of as well by the conda package manager.
I am having a problem with pip just now, when I try to install something like pip install readline then I get an error:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 549, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2709, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2369, in load
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2375, in resolve
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead
So I ran cat /usr/local/bin/pip which tells me pip==1.5.6. I tried to find a solution online regarding this and one solution told to cd /usr/local/lib/python2.7/site-packages && ls but for me I see that folder is also empty.
If upgrading pip doesn't work, you should try uninstalling it and reinstalling it. The error you're encountering is likely due to a mismatch in versions between pip and requests. First, I would remove pip and reinstall it from the source with python like this:
sudo apt-get remove python-pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
From the Ubuntu launchpad site
Just check If You have installed python-setuptools rpm, If this is installed You can use easy_install pip on Redhat Based System.
I would comment this but due to low reputation I can't. Did you try upgrading pip?
pip install --upgrade pip
And then try to do that again.
If you are using Debian flavor OS (like Ubuntu) try this
apt-get remove python-pip
Then try to install the latest version by easy_install
easy_install pip
What do I do wrong?
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==7.1.0', 'console_scripts', 'pip')()
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1- py3.4.egg/pkg_resources/__init__.py", line 558, in load_entry_point
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2682, in load_entry_point
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2355, in load
File "/usr/local/lib/python3.4/dist-packages/setuptools-18.1-py3.4.egg/pkg_resources/__init__.py", line 2361, in resolve
ImportError: No module named 'pip'
Stackoverflow asked me to type more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more and more
Try to fix pip installation with:
sudo apt-get install python3-pip
I've had the same issue and this worked for me. Maybe it's because you only installed pip for an earlier version of python or you intalled it from source and not from you distributions package management.
It sounds like your pip variable isn't set or you're trying to use conflicting environments. If you want to get the python package pymongo installed on your 3.4 version look to use:
/usr/local/bin/pip3.4 install pymongo
Then you can verify by testing in the 3.4 interpreter by running:
python3.4
>>>import pymongo
>>>
In the future look at using virtualenvs, they can be really easy and clean to work with while controlling your packages neatly. Hope this helps!
I updated setuptools using:
easy_install -U setuptool
This ran fine. I then realized I did not want to use the most recent version of setuptools and deleted setuptools-18.3.2-py2.6.egg file from /usr/lib/python2.6/site-packages. After I did this I am getting the following errors when trying to install anything using easy_install shown below.
easy_install ReviewBoard-1.7.6-py2.6
Traceback (most recent call last):
File "/usr/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2659, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: setuptools>=0.7
Looks like ReviewBoard needs setuptools as a dependency. When you ran easy_install ReviewBoard-1.7.6-py2.6, it would have detected that this dependency is already installed but actually it wasn't.
One reason could be that deleting the .egg file was not the complete process of getting rid of a package installed with easy_install. You also need to remove the corresponding line from site-packages/easy-install.pth. Refer: https://stackoverflow.com/a/1233282/4045754
I can't get the ocdev tool to run. when I try running it i receive "SyntaxError: invalid syntax" with some code.
My guess is maybe wrong python version? Since python --version outputs 2.7.3.
I also have python3 installed but it's not the standard version. I installed ocdev using pip-3.2. I already tried reinstalling it multiple times. I also have python3-jinja2 installed. I'm running debian 7.8.
Here is the whole error:
Traceback (most recent call last):
File "/usr/local/bin/ocdev", line 9, in <module>
load_entry_point('ocdev==0.1.2', 'console_scripts', 'ocdev')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2280, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1990, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python3.2/dist-packages/ocdev/application.py", line 20, in <module>
from ocdev.plugins import PLUGINS
File "/usr/local/lib/python3.2/dist-packages/ocdev/plugins/__init__.py", line 1, in <module>
from ocdev.plugins.startapp.startapp import StartApp
File "/usr/local/lib/python3.2/dist-packages/ocdev/plugins/startapp/startapp.py", line 7, in <module>
from jinja2 import Environment, FileSystemLoader
File "/usr/local/lib/python3.2/dist-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/usr/local/lib/python3.2/dist-packages/jinja2/environment.py", line 639
u'\xff\xff\xff\xff'.encode('iso-8859-15')
^
SyntaxError: invalid syntax
In order to get ocdev to work with Python 3.2 you need to install legacy versions of Jinja2(source) and MarkupSafe(source). This is because the newer versions require Python 3.3.
To do the proper install follow the regular setup guide and use the following pip/pip3 commands:
pip install -Iv Jinja2==2.6
pip install -Iv MarkupSafe==0.15
pip install ocdev
I also reported this in the ocdev GitHub repository here.
It looks like you're running Python 3.2.
To use the u'unicode' syntax with Python 3 you'll need at least Python 3.3. (see What's New In Python 3.3)