데비안 서버에 플라스크 설치 문제

데비안 서버에 플라스크 설치 문제

내 서버에 플라스크를 설치하는 데 문제가 있습니다.

$ sudo pip3 install flask
Collecting flask
From cffi callback <function _verify_callback at 0x7f2798df7840>:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/OpenSSL/SSL.py", line 309, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: module 'lib' has no attribute 'X509_up_ref'
  Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask

pip를 업그레이드하고 업데이트했습니다.

$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)

데비안 버전:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.4 (stretch)
Release:    9.4
Codename:   stretch

파이썬 버전:

$ python3 --version
Python 3.5.3

오류 코드에서 볼 수 있듯이 주요 오류는 lib 모듈과 관련이 있다고 생각하지만 해결 방법을 모르겠습니다.

무엇이 잘못되었고 어떻게 해결할 수 있는지에 대한 단서가 있습니까?

답변1

가능하다면 먼저 데비안 리포지토리에서 플라스크와 같은 Python 모듈을 설치한 후 pip. 예를 들어 Flash는 Debian 9: package 에서 사용할 수 있습니다 python3-flask.

  • apt install python3-flask

관련 정보