Cannot install PyTorch on Ubuntu14.04 via pip

(Kalamaya) #1

Hi, made a virtual environment via:

virtualenv pytorch011

I then source it, and then run the command to install pytorch via pip with:

pip install

However I get this error:

Not sure what to do here?


(James Bradbury) #2

This is not a PyTorch issue (it’s actually not really a pip issue either as much as a Python standard library issue). If you are able to, the easiest solution is to update Python to a higher version in the 2.7 sequence (I believe this error means you have <2.7.9). If you’re not able to do that, there may be a way to update just the broken ssl module.

(Kalamaya) #3

I figured as much, so I am in the process of updating python right now to 2.7.13…

(Bartosz Ludwiczuk) #4

I have following problem with installation of newest version:

Is sth wrong with my env?


you could change https:// to http:// in the command you executed. That should work.

(Kalamaya) #6

I ended up just installed python 2.7.13 and now it works.

(Adel Saleh) #7

I got this problem when I was trying to install pytorch :slight_smile:
ConnectionError: HTTPConnectionPool(host=‘’, port=80): Max retries exceeded with url: /whl/cu80/torch-0.1.12.post2-cp27-none-linux_x86_64.whl (Caused by NewConnectionError(’<pip._vendor.requests.packages.urllib3.connection.HTTPConnection object at 0x7f3575aae2d0>: Failed to establish a new connection: [Errno -2] Name or service not known’,))

I used the command:
sudo pip install