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. I can pip install other packages, but get this error with pip install flask.

davidism
  • 121,510
  • 29
  • 395
  • 339
Fabián Montero
  • 1,613
  • 1
  • 16
  • 34
  • This looks like a certificate error... there is a version of 2.7 that gives the same error try 3.6 or 3.5.6 or something... you can also sudo apt-get uninstall python-pip. And try reinstalling with easy_install – Joran Beasley Aug 27 '18 at 15:30
  • https://stackoverflow.com/search?q=%5Bpip%5D+AttributeError%3A+module+%27lib%27+has+no+attribute+%27X509_up_ref%27 – phd Aug 27 '18 at 16:47

0 Answers0