4

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!

mlpy
  • 501
  • 3
  • 5
  • 12
  • 1
    Possible duplicate of [pip cannot confirm SSL certificate: SSL module is not available](https://stackoverflow.com/questions/44290926/pip-cannot-confirm-ssl-certificate-ssl-module-is-not-available) – phd Nov 13 '17 at 14:14
  • I've tried all the solutions in the page, which doesn't help. – mlpy Nov 13 '17 at 14:40
  • 1
    You have to reinstall python after installing SSL libraries because Python's ssl module will be (or not) installed depending on the libraries' existance. Verify Python's ssl module with `python -c "import ssl"`. – phd Nov 13 '17 at 15:45

1 Answers1

2

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!

WiLL_K
  • 575
  • 1
  • 3
  • 22
  • Thanks a lot! I am sure it will help, but I've been using wget and pip3 for half an hour to deal with the dependency problem. I've installed bleach, enum34, numpy, protobuf, six, Werkzeug, wheel and so on manually, but the tensorflow-gpu still needs extra packages. And I don't know whether I can finish the process within 2 more hours since the tensorflow-gpu depends on too many packages. So is there a way which helps to deal with the process more conveniently? Thanks! – mlpy Nov 13 '17 at 14:39
  • What system are you running on Windows or Linux? – WiLL_K Nov 13 '17 at 14:40
  • My server is Ubuntu 16.04. – mlpy Nov 13 '17 at 14:45
  • 1
    Well check this website out and try and install it from scratch [here](https://alliseesolutions.wordpress.com/2016/09/08/install-gpu-tensorflow-from-sources-w-ubuntu-16-04-and-cuda-8-0/) – WiLL_K Nov 13 '17 at 14:47
  • Just change the version numbers as per your requirement. I had setup scripts which I made to help a friend but I couldnt find it at the moment, – WiLL_K Nov 13 '17 at 14:48