0

I am having problems installing flask on my server.

$ 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

I have upgraded and updated pip:

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

Debian version:

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

Python version:

$ python3 --version
Python 3.5.3

I believe the main error is related to the lib module, as you can see on the error code, but I have no idea of how to solve it.

Any clues on what's wrong and how to fix it?

1
  • You have incompatible versions of pyopenssl and cryptography packages. Can you list them? pip show pyopenssl | grep Version and pip show cryptography | grep Version. – hoefling Aug 30 '18 at 8:55
0

If possible, I would first try to install python modules such as flask from the Debian repositories, before trying to install them with pip. Flash for instance is available in Debian 9: package python3-flask.

  • apt install python3-flask

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.