Install Wheel on Raspberry Pi 2 failing - IncompleteRead - python

I'm trying to install a wheel file and keep stumbling over the following error:
pi#raspberrypi:~ $ pip-3.2 install DsController-1.0-py3-none-any.whl
Traceback (most recent call last):
File "/usr/bin/pip-3.2", 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'
I followed the answer in this thread: How do I fix 'ImportError: cannot import name IncompleteRead'?, unfortunately without success.
The Wheel can be installed without problems under Windows.

You are not picking up the version of pip that you have installed when running pip-3.2.
As you can see, version 8.1.2 of download.py does not import IncompleteRead. However, version 1.5.6 of download.py does.
Either your copy of pip and pip-3.2 are not the same executable (and so just using pip will work), or your system has a confused import path that means you are picking up the wrong version of the pip package. In the latter case, remvoing the old installation or fixing your import path should work.

Related

ImportError: No module named 'requests.packages.urllib3'

I am testing an application and I am getting the above error "ImportError: No module named 'requests.packages.urllib3'" Below are the details.
[root#lab ~]# python /opt/test/panda_API.py
Traceback (most recent call last):
File "/opt/test/panda_API.py", line 8, in <module>
import requests
File "/usr/lib/python2.6/site-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/lib/python2.6/site-packages/requests/utils.py", line 32, in <module>
from .exceptions import InvalidURL
File "/usr/lib/python2.6/site-packages/requests/exceptions.py", line 10, in <module>
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
File "/usr/lib/python2.6/site-packages/requests/packages/__init__.py", line 99, in load_module
raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'requests.packages.urllib3'
In a bid to resolve that, I try to pip install requests. Then the following error pops up.
[root#lab ~]# pip install requests
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 954, in <module>
class Environment:
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 958, in Environment
self, search_path=None, platform=get_supported_platform(),
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 188, in get_supported_platform
plat = get_build_platform()
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 388, in get_build_platform
from sysconfig import get_platform
ImportError: No module named sysconfig
I have searched for solution here on stack overflow and other platforms, the closest is the one in this page on stack overflow. (ImportError: No module named sysconfig--can't get pip working).
I have tried the steps proposed in the above link, yet the same error "ImportError: No module named sysconfig", keeps repeating.
Running "pip -V", generated the same error.
Running the recommended command to check the version of setuptools, generated the following error --------
[root#lab pkg_resources]# python2.6 -c "import setuptools; print(setuptools.__version__)"
`Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/setuptools/__init__.py", line 14, in <module >
import setuptools.version
File "/usr/lib/python2.6/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 954, in <mo dule>
class Environment:
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 958, in Env ironment
self, search_path=None, platform=get_supported_platform(),
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 188, in get _supported_platform
plat = get_build_platform()
File "/usr/lib/python2.6/site-packages/pkg_resources/__init__.py", line 388, in get _build_platform
from sysconfig import get_platform
ImportError: No module named sysconfig
I have checked /usr/lib/python2.6/site-packages, and I do not have pkg_resources.py. Instead, what I have is the directory pkg_resources.
It appears that I have a more complicated case. Please I need help please!
Notes:
OS: CentOS release 6.10 (Final), and Python Version: Python 2.6.6
firstly run this command,
pip install requests urllib3 pyOpenSSL --force --upgrade
then install pyOpenSSL version 16.2.0 and run this command
pip install pyOpenSSL==16.2.0
Update your distribution packages! Python 2.6 is dead.

Import Error: DependencyWarning with every pip install attempt

I'm a mac user and installing with pip used to work. However I did something and now it doesn't work anymore. When running pip install somepackagename, I get the error ImportError: cannot import name DependencyWarning. I pasted the entire error below for trying to install PyPDF2.
For as far as I understand it the error is something with the requests module. I tried to uninstall it running pip uninstall requests, which results in the same error. Uninstalling other packages as well.
Anybody got an idea what's going wrong?
The error when installing PyPDF2
Traceback (most recent call last):
File "/Users/Arno/Library/Enthought/Canopy_64bit/User/bin/pip", line 9, in <module>
load_entry_point('pip==7.1.2', 'console_scripts', 'pip')()
File "/Users/Arno/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/Arno/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/Users/Arno/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/Users/Arno/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/Users/Arno/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pip/__init__.py", line 22, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
ImportError: cannot import name DependencyWarning

Not able to install modules using pip due to HTTPSHandler error Cygwin

I was not being able to installed any module in the cygwin.
I have already:
Removed and reinstalled Python
Removed and reinstalled openssl and openssl-devel
However, the problems still happens?
$ pip install iplib
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 552, i n load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2672, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2345, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 16, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py", line 9, in <mod ule>
from pip.index import Link
File "/usr/lib/python2.7/site-packages/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 39, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 1 4, in <module>
from .compat import sysconfig, detect_encoding, ZipFile
File "/usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py", line 31 , in <module>
from urllib2 import (Request, urlopen, URLError, HTTPError,
ImportError: cannot import name HTTPSHandler
If reinstalling virtaulenv doesn't solve your problem, try installing OpenSSl(I do realize you've already reinstalled openssl but doesn't hurt to try it again):
yum install openssl openssl-devel -y
See this.

ImportError: No module named 'pip._vendor.distlib.scripts' when I try to install fabric by python pip

When I run this command on CentOS4.9, it happens such error. I try to search it in Google but no found. Looks I am the first person meets such issue.
# pip install fabric
Traceback (most recent call last):
File "/usr/local/bin/pip", line 8, in <module>
load_entry_point('pip==7.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11- py2.7.egg/pkg_resources.py", line 318, in load_entry_point
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2221, in load_entry_point
File "/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1954, in load
File "/usr/local/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/__init__.py", line 15, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/vcs/subversion.py", line 9, in <module>
from pip.index import Link
File "/usr/local/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/index.py", line 30, in <module>
from pip.wheel import Wheel, wheel_ext
File "/usr/local/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/wheel.py", line 34, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "/usr/local/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/_vendor/__init__.py", line 92, in load_module
raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'pip._vendor.distlib.scripts'
I went to /usr/local/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/_vendor/distlib. There is scripts.py file.
As suggested here, try installing SSL support.
On CentOS:
yum install openssl openssl-devel
On Debian:
apt-get -y install libssl-dev
If libssl-dev is not present, try: openssl-dev.

Error installing Dynamic-DynamoDB using pip

I am completely newbie to Python and just trying to install Dynamic-DynamoDB python package on RHEL5 Linux for very first time. I didn't have pip on my system so I followed instructions as in asnwer to What is the official "preferred" way to install pip and virtualenv systemwide?
Now when I try to install dynamic-dynamoDB as mentioned in installing instructions, it gives me error.
pip install dynamic-dynamodb
Error
Traceback (most recent call last):
File "/usr/bin//pip", line 8, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/distribute-0.6.49-py2.4.egg/pkg_resources.py", line 345, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.4/site-packages/distribute-0.6.49-py2.4.egg/pkg_resources.py", line 2381, in load_entry_point
return ep.load()
File "/usr/lib/python2.4/site-packages/distribute-0.6.49-py2.4.egg/pkg_resources.py", line 2087, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.4/site-packages/pip/__init__.py", line 11, in ?
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.4/site-packages/pip/vcs/mercurial.py", line 9, in ?
from pip.download import path_to_url2
File "/usr/lib/python2.4/site-packages/pip/download.py", line 3, in ?
import hashlib
ImportError: No module named hashlib
Any suggestions on what am I missing here?
I'm the author of Dynamic-DynamoDB. Sorry for a late answer, I wanted to answer anyway in case anyone else has the same problem later on.
The reason is that the Python version is too old. Dynamic DynamoDB supports Python >2.6.

Categories

Resources