Tensorflow installation error: not a supported whe

2020-01-27 02:34发布

when I try to install tensorflow by cloning from git, I run into the error "no module named copyreg," so I tried installing using a virtualenv. However, I then run into this error:

pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl

tensorflow-0.5.0-py2-none-any.whl is not a supported wheel on this platform.

I don't see this under the common problems section, so any help would be appreciated! Thank you.

12条回答
爷的心禁止访问
2楼-- · 2020-01-27 02:48

The pip wheel contains the python version in its name (cp34-cp34m). If you download the whl file and rename it to say py3-none or instead, it should work. Can you try that?

The installation won't work for anaconda users that choose python 3 support because the installation procedure is asking to create a python 3.5 environment and the file is currently called cp34-cp34m. So renaming it would do the job for now.

sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.7.0-cp34-cp34m-linux_x86_64.whl

This will produced the exact error message you got above. However, when you will downloaded the file yourself and rename it to "tensorflow-0.7.0-py3-none-linux_x86_64.whl", then execute the command again with changed filename, it should work fine.

查看更多
Fickle 薄情
3楼-- · 2020-01-27 02:49

I too got the same problem
I downloaded get-pip.py from https://bootstrap.pypa.io/get-pip.py

and then ran python2.7 get-pip.py for installing pip2.7

and then ran the pip install command with python2.7 as follows

For Ubuntu/Linux:

python2.7 -m pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

For Mac OS X:

python2.7 -m pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl

this should work just fine as it did for me :)

I followed these instructions from here

查看更多
神经病院院长
4楼-- · 2020-01-27 02:57

Make sure that the wheel is, well, supported by your platform. Pip uses the wheel's filename to determine compatibility. The format is:

tensorflow-{version}-{python version}-none-{your platform}.whl

I didn't realize that x86_64 refers to x64, I thought it meant either x86 or x64, so I banged my head against this futilely for some time. Tensorflow is not available for 32 bit systems, unless you want to compile it yourself.

查看更多
家丑人穷心不美
5楼-- · 2020-01-27 02:57

I was trying to install from source, and got that error. (Why would a wheel built on this machine not be compatible with it-?)

For me, the tag --ignore-installed made all the difference.

pip install --ignore-installed /tmp/tensorflow_pkg/tensorflow-1.8.0-cp36-cp36m-linux_x86_64.whl

worked, while

pip install /tmp/tensorflow_pkg/tensorflow-1.8.0-cp36-cp36m-linux_x86_64.whl 

threw the abovementioned error.

Context: Conda environment; might have been a problem specific to this

查看更多
不美不萌又怎样
6楼-- · 2020-01-27 02:58

actually, you can use Python 3.5., I successfully solved this problem with Python 3.5.3. Modify python version to 3.5. in conda, see https://conda.io/docs/py2or3.html. then go to https://www.tensorflow.org/install/install_windows, and repeat from "Create a conda environment named tensorflow by invoking the following command" BLA BLA.....

查看更多
Evening l夕情丶
7楼-- · 2020-01-27 03:01

I faced the same issue and tried all the solutions that folks suggested here and other links (like https://askubuntu.com/questions/695981/platform-not-supported-for-tensorflow-on-ubuntu-14-04-2).

It was so frustrating because using print(wheel.pep425tags.get_supported()) I could see that my ubuntu supported ('cp37', 'cp37m', 'linux_x86_64') and that was exactly what I was trying to install (from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp37-cp37m-linux_x86_64.whl).

What at the end fixed it was to simply download the package first and then

pip install tensorflow-1.14.0-cp37-cp37m-linux_x86_64.whl
查看更多
登录 后发表回答