Cannot update OpenSSL for Python3
Cecil Westerhof
Cecil at decebal.nl
Mon May 4 15:52:46 EDT 2015
Op Monday 4 May 2015 21:02 CEST schreef Irmen de Jong:
> On 4-5-2015 19:19, Cecil Westerhof wrote:
>
>> It looks like I am encircled by Gremlins:
>>>>> import urllib3.contrib.pyopenssl
>> Traceback (most recent call last): File "<stdin>", line 1, in
>> <module> File
>> "/usr/lib/python3.4/site-packages/urllib3/contrib/pyopenssl.py",
>> line 58, in <module> from socket import _fileobject, timeout
>> ImportError: cannot import name '_fileobject'
>>
>
> Looks to me as if you have installed a Python 2 version of urllib3?
> pyopenssl? and are trying to run that under python 3.
>
> (socket module in python 2 does have a _fileobject, whereas in
> python 3 it no longer has it. Checked in CPython on Windows.)
I did an uninstall and installed it again:
pip3 install urllib3
Downloading/unpacking urllib3
Downloading urllib3-1.10.4.tar.gz (138kB): 138kB downloaded
Running setup.py (path:/tmp/pip_build_root/urllib3/setup.py) egg_info for package urllib3
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing collected packages: urllib3
Running setup.py install for urllib3
warning: no previously-included files matching '*' found under directory 'docs/_build'
Successfully installed urllib3
Cleaning up...
But I keep getting the error. Only 2 lines earlier:
>>> import urllib3.contrib.pyopenssl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.4/site-packages/urllib3/contrib/pyopenssl.py", line 56, in <module>
from socket import _fileobject, timeout
ImportError: cannot import name '_fileobject'
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
More information about the Python-list
mailing list