Closed raj454raj closed 9 years ago
That error is being thrown within the pip vendored code, so I'd say a pip issue.
What platform, Python version are you using?
Also what pip version?
@rbtcollins : Thanks for you reply. Python 2.7.7 Pip 1.5.6 Any help?
Hi sorry.
So - I'd suggest you try pip 6.1.1 as a first step. Thats quite a bit newer, and may include a fix.
Hey @rbtcollins. Again the same error pops up when installing pip with python get-pip.py
> Collecting pip
Exception:
Traceback (most recent call last):
File "/tmp/tmpQjEY9r/pip.zip/pip/basecommand.py", line 246, in main
status = self.run(options, args)
File "/tmp/tmpQjEY9r/pip.zip/pip/commands/install.py", line 342, in run
requirement_set.prepare_files(finder)
File "/tmp/tmpQjEY9r/pip.zip/pip/req/req_set.py", line 345, in prepare_files
functools.partial(self._prepare_file, finder))
File "/tmp/tmpQjEY9r/pip.zip/pip/req/req_set.py", line 290, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/tmp/tmpQjEY9r/pip.zip/pip/req/req_set.py", line 467, in _prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "/tmp/tmpQjEY9r/pip.zip/pip/req/req_install.py", line 251, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/tmp/tmpQjEY9r/pip.zip/pip/index.py", line 425, in find_requirement
all_versions = self._find_all_versions(req.name)
File "/tmp/tmpQjEY9r/pip.zip/pip/index.py", line 349, in _find_all_versions
index_locations = self._get_index_urls_locations(project_name)
File "/tmp/tmpQjEY9r/pip.zip/pip/index.py", line 323, in _get_index_urls_locations
page = self._get_page(main_index_url)
File "/tmp/tmpQjEY9r/pip.zip/pip/index.py", line 789, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/tmp/tmpQjEY9r/pip.zip/pip/index.py", line 878, in get_page
"Cache-Control": "max-age=600",
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/sessions.py", line 476, in get
return self.request('GET', url, **kwargs)
File "/tmp/tmpQjEY9r/pip.zip/pip/download.py", line 367, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/sessions.py", line 464, in request
resp = self.send(prep, **send_kwargs)
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/cachecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/adapters.py", line 370, in send
timeout=timeout
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 539, in urlopen
self._prepare_proxy(conn)
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 727, in _prepare_proxy
conn.connect()
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/packages/urllib3/connection.py", line 238, in connect
ssl_version=resolved_ssl_version)
File "/tmp/tmpQjEY9r/pip.zip/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py", line 296, in ssl_wrap_socket
cnx.set_tlsext_host_name(server_hostname)
AttributeError: '_socketobject' object has no attribute 'set_tlsext_host_name'
Is there a way to get rid of pip completely and then start from scratch. PS: I am using Ubuntu 14.04 under proxy network I tried this also
python get-pip.py --proxy="http://proxy.iiit.ac.in:8080/
and
pip install -U pip
which leads to same traceback
Try this:
Hey @rbtcollins sorry but I didn't understand the first part
I was able to correct this error by upgrading pyOpenSSL
@nwork : How did you upgraded pyOpenSSL since I get the error while upgrading by pip also. Please I urgently need to fix this issue.
via their github page https://github.com/pyca/pyopenssl
@nwork : Tried a lot no good still. Github page suggests pip install pyopenssl - which gives me requirement satisfied and on --upgrade it gives me -
Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pyopenssl in /usr/local/lib/python2.7/dist-packages Downloading/unpacking pyopenssl Cleaning up... No distributions at all found for pyopenssl in /usr/local/lib/python2.7/dist-packages Storing debug log for failure in /home/raj/.pip/pip.log
Please help me !!!
I just downloaded the zip via the browser.. cd extractedDir sudo python setup.py install
Hmm, I think this is another one that either @sigmavirus24 or @lukasa would have insight on, I think this is a urllib3 problem.
Looks like an old version of PyOpenSSL is installed, which is missing set_tlsext_host_name
. That means it's a version lower than 0.13. Consider upgrading. =)
Separately, requests should probably version check pyopenssl before we inject it. Thoughts @sigmavirus24?
Ok, I'm going to close this issue then since @Lukasa thinks it's just an old PyOpenSSL. Thanks!
@Lukasa I'm okay with that. We should probably discuss that on a requests issue though
I am not able to upgrade my pyopenssl and hence the problem still remains
On Sun, 10 May 2015 01:12 Ian Cordasco notifications@github.com wrote:
@Lukasa https://github.com/Lukasa I'm okay with that. We should probably discuss that on a requests issue though
— Reply to this email directly or view it on GitHub https://github.com/pypa/pip/issues/2696#issuecomment-100536155.
@raj454raj try uninstalling pyOpenSSL first
After upgrading pyOpenSSL
I still have this issue. If I uninstall ndg-httpsclient
, it goes away, but then I get a warning that a true SSL context object is not available, ssl is unusable.
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Not sure what is wrong, since I have a subset of the same set of packages/versions in another installation that works fine (although, that is a CentOS 6, while the one with issues is a RedHat 6, but still), with ndg-httpsclient present (and ssl working).
Solved it by running yum remove pyOpenSSL
(somehow the older version from yum messed up the installation.. :p)
We ran into this. We had to apt-get uninstall python-openssl (0.12), after which we're able to pip install pyOpenSSL (0.15.1) which resolves the issue.
apt-get remove python-openssl
works for me.
This is the traceback when pip install twitter is given
Similar erri=or is raised in the case of upgrading any package. Is it a problem with pip or requests module or urllib3. Can anyone suggest a fix.