When installing

pip3 instal pyopenssl 

Mistake:

Command python setup.py in / tmp / pip-build-mycc1h6w / cffi Storing debug log in / tmp / pip-build-mycc1h6w

Last lines of the log

 Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-l_hkw94a/cffi Exception information: Traceback (most recent call last): File "/root/todo-api/env/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/root/todo-api/env/lib/python3.4/site-packages/pip/commands/install.py", line 304, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/root/todo-api/env/lib/python3.4/site-packages/pip/req.py", line 1230, in prepare_files req_to_install.run_egg_info() File "/root/todo-api/env/lib/python3.4/site-packages/pip/req.py", line 326, in run_egg_info command_desc='python setup.py egg_info') File "/root/todo-api/env/lib/python3.4/site-packages/pip/util.py", line 716, in call_subprocess % (command_desc, proc.returncode, cwd)) pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-l_hkw94a/cffi 

Linux-3.19.0-28-generic-x86_64-with-Ubuntu-15.04-vivid

 Dezmont@137407:~$ /usr/bin/python3 -c 'import OpenSSL' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/local/lib/python3.4/dist-packages/OpenSSL/__init__.py", line 8, in <module> from OpenSSL import rand, crypto, SSL File "/usr/local/lib/python3.4/dist-packages/OpenSSL/SSL.py", line 112, in <module> if _lib.Cryptography_HAS_SSL_ST: AttributeError: 'FFILibrary' object has no attribute 'Cryptography_HAS_SSL_ST' 

How to solve this problem?

  • tried sudo apt-get install python3-openssl ? - jfs
  • Tried did not help - Dezmont
  • What does "not help" mean? What does dpkg -l python3-openssl show? What error: /usr/bin/python3 -c OpenSSL ? - jfs
  • @jfs is something like this when installing cryptography is also a mistake, but different. You can see for yourself, I will give the password. But I already broke my whole head - Dezmont
  • python3 -с OpenSSL is my mistake. I meant: /usr/bin/python3 -c 'import OpenSSL' . (don't forget /usr/bin/ ) - jfs

1 answer 1

I solved the problem by removing the old version of pip

 sudo apt-get remove --purge python-pip sudo rm -rf /usr/local/lib/python2.7/{dist,site}-packages/pip* sudo rm -rf /usr/local/lib/python2.7/{dist,site}-packages/pillow* 

The answer here found

  • The commands that try to remove a broken pip installation for Python 2 have nothing to do with installing the package in Python 3 . - jfs
  • @jfs May not have. But everything finally worked, and this is important - Dezmont