I am trying to install packages from inside the virtualenv
(Ubuntu 14.04LTS)
pip install scipy
I end up with the following error:
Collecting scipy
Exception:
Traceback (most recent call last):
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 390, in send
conn = self.get_connection(request.url, proxies)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 290, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 184, in proxy_manager_for
**proxy_kwargs
File "/home/rduser/venvs/python2713/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/socks.py", line 154, in __init__
"Unable to determine SOCKS version from %s" % proxy_url
ValueError: Unable to determine SOCKS version from socks://10.0.0.28:8080/
How do I get past this.?
P.S: I am using the latest version of pip
Related
So I operate my pc on a college based network using a proxy server. So for using pip I tried a lot of things to implement the proxy tunneling for pypip as well.
But I kept getting the same kind of error,so I tried removing the proxy, connecting to a non college wifi and trying it again. But somehow it's stuck on using the same proxy address again and again, even though i've turned off the proxy in windows proxy settings.
Exception:
Traceback (most recent call last):
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\cli\base_command.py", l
ine 179, in main
status = self.run(options, args)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\commands\install.py", l
ine 315, in run
resolver.resolve(requirement_set)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\resolve.py", line 131,
in resolve
self._resolve_one(requirement_set, req)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\resolve.py", line 294,
in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\resolve.py", line 242,
in _get_abstract_dist_for
self.require_hashes
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\operations\prepare.py",
line 269, in prepare_linked_requirement
req.populate_link(finder, upgrade_allowed, require_hashes)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\req\req_install.py", li
ne 196, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\index.py", line 639, in
find_requirement
all_candidates = self.find_all_candidates(req.name)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\index.py", line 610, in
find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\index.py", line 743, in
_get_pages
page = _get_html_page(location, session=self.session)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\index.py", line 229, in
_get_html_page
resp = _get_html_response(url, session=session)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\index.py", line 177, in
_get_html_response
"Cache-Control": "max-age=0",
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\requests\sessions.py", li
ne 546, in get
return self.request('GET', url, **kwargs)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_internal\download.py", line 403,
in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\requests\sessions.py", li
ne 533, in request
resp = self.send(prep, **send_kwargs)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\requests\sessions.py", li
ne 646, in send
r = adapter.send(request, **kwargs)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\cachecontrol\adapter.py",
line 53, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\requests\adapters.py", li
ne 412, in send
conn = self.get_connection(request.url, proxies)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\requests\adapters.py", li
ne 309, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\requests\adapters.py", li
ne 199, in proxy_manager_for
**proxy_kwargs)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\urllib3\poolmanager.py",
line 450, in proxy_from_url
return ProxyManager(proxy_url=url, **kw)
File "c:\users\deepa\appdata\local\programs\python\python37-32\lib\site-packages\pip_vendor\urllib3\poolmanager.py",
line 401, in init
raise ProxySchemeUnknown(proxy.scheme)
pip._vendor.urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme adityaga
When I run pip install matplotlib or pip3 install matplotlib from my terminal, I get the following error. Can someone tell me why this is happening? I use ubuntu 16.04. Thanks in advance.
Collecting matplotlib
Exception:
Traceback (most recent call last):
File "/home/surya/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/surya/.local/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/home/surya/.local/lib/python3.5/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/home/surya/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/surya/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/home/surya/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/surya/.local/lib/python3.5/site-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/home/surya/.local/lib/python3.5/site-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/home/surya/.local/lib/python3.5/site-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/home/surya/.local/lib/python3.5/site-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/home/surya/.local/lib/python3.5/site-packages/pip/index.py", line 792, in get_page
"Cache-Control": "max-age=600",
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "/home/surya/.local/lib/python3.5/site-packages/pip/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 390, in send
conn = self.get_connection(request.url, proxies)
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 290, in get_connection
proxy_manager = self.proxy_manager_for(proxy)
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 184, in proxy_manager_for
**proxy_kwargs
File "/home/surya/.local/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py", line 43, in SOCKSProxyManager
raise InvalidSchema("Missing dependencies for SOCKS support.")
pip._vendor.requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
When trying to pip install any package (specifically, right now, gspread)...
Full message I get is:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 305, in run
wb.build(autobuilding=True)
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 705, in build
self.requirement_set.prepare_files(self.finder)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 409, in _prepare_file
req_to_install, finder)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 365, in _check_skip_installed
finder.find_requirement(req_to_install, self.upgrade)
File "/Library/Python/2.7/site-packages/pip/index.py", line 486, in find_requirement
all_versions = self._find_all_versions(req.name)
File "/Library/Python/2.7/site-packages/pip/index.py", line 404, in _find_all_versions
index_locations = self._get_index_urls_locations(project_name)
File "/Library/Python/2.7/site-packages/pip/index.py", line 378, in _get_index_urls_locations
page = self._get_page(main_index_url)
File "/Library/Python/2.7/site-packages/pip/index.py", line 818, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/Library/Python/2.7/site-packages/pip/index.py", line 928, in get_page
"Cache-Control": "max-age=600",
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/sessions.py", line 477, in get
return self.request('GET', url, **kwargs)
File "/Library/Python/2.7/site-packages/pip/download.py", line 373, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/Library/Python/2.7/site-packages/pip/_vendor/cachecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/adapters.py", line 370, in send
timeout=timeout
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 344, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
File "/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 314, in _raise_timeout
if 'timed out' in str(err) or 'did not complete (read)' in str(err): # Python 2.6
TypeError: __str__ returned non-string (type Error)
I am running high sierra,
which pip = /usr/local/bin/pip
python = 2.7.1
I am still new to python and this is my first time using it on this machine. I have googled a lot of different variations of this problem and am unable to figure out what I am doing wrong.
Sorry for such a simple question but any help would be appreciated. Thanks
I am installing django in ubuntu using the command pip install django==1.11.2 but i am getting the following error
Collecting django==1.11.2
Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 555, in urlopen
self._prepare_proxy(conn)
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py", line 753, in _prepare_proxy
conn.connect()
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connection.py", line 230, in connect
self._tunnel()
File "/usr/lib/python3.5/http/client.py", line 832, in _tunnel
message.strip()))
OSError: Tunnel connection failed: 407 Proxy Authentication Required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 328, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 748, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 512, in _prepare_file
finder, self.upgrade, require_hashes)
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 273, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 442, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 400, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 545, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 648, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 757, in get_page
"Cache-Control": "max-age=600",
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/pip/download.py", line 378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
.
.
.
File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py", line 228, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
i have also tried sudo -H pip install django==1.11.2 still the same error
Seems like the issue is with your internet connection. I believe you are under proxy. You need to set the proxy.
For some reason I can't use pip to install or update python packages in my system.
I get this error.
Exception:
Traceback (most recent call last):
File
"/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/basecommand.py",
line 209, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/commands/install.py",
line 299, in run
requirement_set.prepare_files(finder)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/req/req_set.py",
line 360, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/req/req_set.py",
line 448, in _prepare_file
req_to_install, finder)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/req/req_set.py",
line 397, in _check_skip_installed
finder.find_requirement(req_to_install, self.upgrade)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/index.py",
line 440, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/index.py",
line 398, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/index.py",
line 543, in _get_pages
page = self._get_page(location)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/index.py",
line 646, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/index.py",
line 755, in get_page
"Cache-Control": "max-age=600",
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/sessions.py",
line 480, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/download.py",
line 378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/sessions.py",
line 468, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/sessions.py",
line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/cachecontrol/adapter.py",
line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/adapters.py",
line 376, in send
timeout=timeout
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py",
line 559, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py",
line 345, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py",
line 784, in _validate_conn
conn.connect()
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/connection.py", line 252, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/lib/python2.7/site-packages/pip-8.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py",
line 296, in ssl_wrap_socket
cnx.set_tlsext_host_name(server_hostname)
File "build/bdist.linux-x86_64/egg/OpenSSL/SSL.py", line 423, in explode
raise NotImplementedError(error) NotImplementedError: SNI not available
I tried installing the packages pyOpenSSL, ndg-httpsclient and pyasn1 manually but still the problem persists.
My system is a RED HAT 4.1.2(server) with Python 2.7.3
Thanks in advance
You OpenSSL(not pyOpenSSL) is too old, you need to install an OpenSSL version that supports SNI.