mlpy
mlpy

Reputation: 511

pip3 can't install anything due to some reason about ssl

After upgrading my ubuntu server 16.04, I can't install modules with pip3 for my python3.6. This is what I get when I try to install tensorflow-gpu for python3:

root@amax:~# pip3 install tensorflow-gpu
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting tensorflow-gpu
  Could not fetch URL https://pypi.python.org/simple/tensorflow-gpu/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not find a version that satisfies the requirement tensorflow-gpu (from versions: )
No matching distribution found for tensorflow-gpu

This is my python3 and pip3 version:

root@amax:~# python3 -V
Python 3.6.1
root@amax:~# which python3
/usr/local/bin/python3
root@amax:~# pip3 -V
pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)

I am sure that the openssl is installed on my server:

root@amax:~# apt -y install openssl libssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssl-dev is already the newest version (1.0.2g-1ubuntu13).
openssl is already the newest version (1.0.2g-1ubuntu13).

I think the cause of the problem might be the version of my pip3 doesn't match the openssl version. What should I do? Any suggestions will be appreciated! Thank you!

Upvotes: 4

Views: 1375

Answers (1)

WiLL_K
WiLL_K

Reputation: 593

may be you can download a .whl file and install it with pip3

The wheel file can be found here

and then just use this to install

pip3 install /home/Downloads/tensorflow-1.4.0-cp36-cp36m-manylinux1_x86_64.whl

Hopes this solves your problem

Cheers!

Upvotes: 2

Related Questions