Error during installation on new machine with python 2.7.12
g-leon opened this issue · comments
g-leon commented
I am using an Ubuntu 14.04 machine with python 2.7.12. After I have installed hyper I got the following error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip_build_root/cryptography/setup.py", line 335, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 239, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 264, in fetch_build_eggs
▽
from hyper import HTTPConnection
replace_conflicting=True
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 620, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 858, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 870, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 314, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 616, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 646, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 834, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1040, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1028, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-JfgJ9U-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log
If I try to import hyper I get:
Traceback (most recent call last):
File "/usr/local/bin/hyper", line 7, in <module>
from hyper.cli import main
File "/usr/local/lib/python2.7/dist-packages/hyper/__init__.py", line 11, in <module>
from .common.connection import HTTPConnection
File "/usr/local/lib/python2.7/dist-packages/hyper/common/connection.py", line 10, in <module>
from ..http20.connection import HTTP20Connection
File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 35, in <module>
TRANSIENT_SSL_ERRORS = (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE)
AttributeError: 'NoneType' object has no attribute 'SSL_ERROR_WANT_READ'
Cory Benfield commented
On Ubuntu 14.04 we need to install the PyOpenSSL and cryptography packages to get a more up-to-date interface to OpenSSL. Can you follow the instructions from here and then reinstall? That should resolve your issue.