Python은 OpenSSL을 가져올 수 없습니다.

Python은 OpenSSL을 가져올 수 없습니다.

가상 환경을 만들었습니다.매트릭스 홈 서버에 설치됨공유 호스팅.

$ virtualenv -p python2.7 /home/tristank/venv/synapse
$ source /home/tristank/venv/synapse/bin/activate

필요한 모든 종속성을 설치하고 서버를 시작했지만 어떤 이유로 Python이 Openssl을 인식하지 못합니다.왜 그런 겁니까? Python이 OpenSSL을 선택하도록 만드는 방법은 무엇입니까?

$ python -V
Python 2.7.3

$ python -c 'import ssl; print ssl.OPENSSL_VERSION'
OpenSSL 1.0.0-fips 29 Mar 2010

$ which openssl 
~/.toast/armed/bin/openssl

$ toast status openssl
openssl
  version 1.0.2d: stored
    urls:
      https://www.openssl.org/source/openssl-1.0.2d.tar.gz
    build 1: armed

$ python -m synapse.app.homeserver \
> --server-name my.domain.name \
> --config-path homeserver.yaml \
> --generate-config
ERROR:root:Can't import 'OpenSSL' which is part of 'pyopenssl>=0.14'
Traceback (most recent call last):
  File "/home/tristank/venv/synapse/lib/python2.7/site-packages/synapse/python_dependencies.py", line 90, in check_requirements
    module = __import__(module_name)
      File "/home/tristank/venv/synapse/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/home/tristank/venv/synapse/lib/python2.7/site-packages/OpenSSL/rand.py", line 11, in <module>
    from OpenSSL._util import (
  File "/home/tristank/venv/synapse/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/home/tristank/venv/synapse/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: libssl.so.1.0.0: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/package/host/localhost/python-2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/package/host/localhost/python-2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/tristank/venv/synapse/lib/python2.7/site-packages/synapse/app/homeserver.py", line 22, in <module>
    check_requirements()
  File "/home/tristank/venv/synapse/lib/python2.7/site-packages/synapse/python_dependencies.py", line 98, in check_requirements
    % (module_name, dependency)
synapse.python_dependencies.MissingRequirementError: Can't import 'OpenSSL' which is part of 'pyopenssl>=0.14'

$ pip install pyopenssl
Requirement already satisfied (use --upgrade to upgrade): pyopenssl in /home/tristank/venv/synapse/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /home/tristank/venv/synapse/lib/python2.7/site-packages (from pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): cryptography>=0.7 in /home/tristank/venv/synapse/lib/python2.7/site-packages (from pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/tristank/venv/synapse/lib/python2.7/site-packages (from cryptography>=0.7->pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): enum34 in /home/tristank/venv/synapse/lib/python2.7/site-packages (from cryptography>=0.7->pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /home/tristank/venv/synapse/lib/python2.7/site-packages (from cryptography>=0.7->pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.8 in /home/tristank/venv/synapse/lib/python2.7/site-packages (from cryptography>=0.7->pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): idna>=2.0 in /home/tristank/venv/synapse/lib/python2.7/site-packages (from cryptography>=0.7->pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.1.0 in /home/tristank/venv/synapse/lib/python2.7/site-packages (from cryptography>=0.7->pyopenssl)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /home/tristank/venv/synapse/lib/python2.7/site-packages (from cffi>=1.1.0->cryptography>=0.7->pyopenssl)

관련 정보