3

I follow the tutorial command on pytorch site, but such errors came out.

error: torch-1.0.0-cp27m-linux_x86_64.whl is not a valid wheel filename.

I used following commands for installation.

pip install https://download.pytorch.org/whl/cu80/torch-1.0.0-cp27-cp27m-linux_x86_64.whl
Morse
  • 8,258
  • 7
  • 39
  • 64
Hee.Kim
  • 41
  • 3
  • Show the results of following commands: `python --version`, `pip --version`, `uname -a` and `lsb_release -a`. The error might be because of incompatible versions. – kHarshit Jan 25 '19 at 07:34
  • Python 2.7.6 pip 19.0.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) Linux heejae 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux heejae@heejae:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty – Hee.Kim Jan 28 '19 at 01:17
  • since i installed tensorflow, cudnn for python2.7, i cannot change the version of python... – Hee.Kim Jan 28 '19 at 01:20
  • sometimes this kind of error comes out ...Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='download.pytorch.org', port=443): Max retries exceeded with url: /whl/cu80/torch-1.0.0-cp27-cp27mu-linux_x86_64.whl (Caused by SSLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),)) – Hee.Kim Jan 28 '19 at 01:53

1 Answers1

0

The wheel is a ZIP archive with the .whl extension that should have a specially formatted file name and contain a relocatable Python package to be recognized on your platform.

Please use your web browser such as Firefox to obtain manylinux1 wheels directly from PyPI website:

torch-1.0.1.post2-cp27-cp27m-manylinux1_x86_64.whl (582.6 MB)
torch-1.0.1.post2-cp27-cp27mu-manylinux1_x86_64.whl (582.5 MB) <= try this one

Please make sure to choose one appropriate for your specific OS/platform. In your case, the mu-manylinux1 is the most likely choice. You could use this shell command to ensure:

$ python -c "import sys; print 'UCS4/UTF-32: mu-manylinux1' if sys.maxunicode > 65535 else 'UCS2/UTF-16: m-manylinux1'"
Python 3 version:
$ python3 -c "import sys; print('UCS4/UTF-32: mu-manylinux1' if sys.maxunicode > 65535 else 'UCS2/UTF-16: m-manylinux1')"

mu is more common and means that your Python stores Unicode data in UCS-4 (UTF-32) format.
cp27 stands for Python 2.7; likewise cp36 is for Python 3.6
x86_64 is for 64-bit platform. Pytorch doesn't support 32-bit..

All manylinux1 wheels require pip v8.1 or later to be pip install'ed (you have v19.0.1 - ok).

Regarding the SSLError...sslv3 alert handshake failure you've mentioned in the comment, it's caused by the fact that pip doesn't use old SSL/TLS protocols to connect to PyPI since about a year ago, but your system's underlying OpenSSL library is outdated, and Python 2.7.6 ssl module doesn't support the required TLS 1.2 protocol anyway. I will address this issue in your another posting.