【问题标题】:tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platformtensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl 不是该平台支持的轮子
【发布时间】:2017-03-22 18:12:38
【问题描述】:

我在 Ubuntu 14.04 LTS 上从源代码构建了 TensorFlow。 我收到以下错误:

tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl 不是该平台支持的轮子。

$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package 

...

cc1plus: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
Target //tensorflow/tools/pip_package:build_pip_package up-to-date:
  bazel-bin/tensorflow/tools/pip_package/build_pip_package
INFO: Elapsed time: 3222.284s, Critical Path: 2243.74s
ubuntu@ip-10-0-1-32:~/tensorflow$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
Tue Mar 21 22:17:06 UTC 2017 : === Using tmpdir: /tmp/tmp.JVDbpc8IYs
~/tensorflow/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles ~/tensorflow
~/tensorflow
/tmp/tmp.JVDbpc8IYs ~/tensorflow
Tue Mar 21 22:17:07 UTC 2017 : === Building wheel
warning: no files found matching '*.dll' under directory '*'
warning: no files found matching '*.lib' under directory '*'
~/tensorflow
Tue Mar 21 22:17:29 UTC 2017 : === Output wheel file is in: /tmp/tensorflow_pkg

$ sudo pip install /tmp/tensorflow_pkg/tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl 
tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.
Storing debug log for failure in /home/ubuntu/.pip/pip.log

ubuntu@ip-10-0-1-202:~$ python -m pip install --upgrade pip
Requirement already up-to-date: pip in ./anaconda/lib/python2.7/site-packages
ubuntu@ip-10-0-1-202:~$ man pip
ubuntu@ip-10-0-1-202:~$ pip --version
pip 9.0.1 from /home/ubuntu/anaconda/lib/python2.7/site-packages (python 2.7)

vi /home/ubuntu/.pip/pip.log:

tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 257, in run
    InstallRequirement.from_line(name, None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 168, in from_line
    raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
UnsupportedWheel: tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.

我在使用 protobuf 轮时遇到了同样的错误:

sudo -H pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.0.0b2.post2-cp27-none-linux_x86_64.whl 
protobuf-3.0.0b2.post2-cp27-none-linux_x86_64.whl is not a supported wheel on this platform.

【问题讨论】:

    标签: tensorflow


    【解决方案1】:

    tensorflow-1.0.1-cp27-cp27mu-linux_x86_64.whl 中的cp27 表示它适用于 python-2.7。

    【讨论】:

      【解决方案2】:

      会不会是你的点子过时了?试试python -m pip install --upgrade pip

      检查/home/ubuntu/.pip/pip.log中的日志也可能会有所帮助

      【讨论】:

      • 这可能是 32 位系统,而您正在安装 64 位轮盘吗?
      • ubuntu@ip-10-0-1-213:/usr/lib/nvidia-375/bin$ uname -a Linux ip-10-0-1-213 3.13.0-92-通用 #139-Ubuntu SMP 2016 年 6 月 28 日星期二 20:42:26 UTC x86_64 x86_64 x86_64 GNU/Linux
      【解决方案3】:

      sudo 检索到 'pip' 的 3.4 版本(而不是 2.7 版本):

      ubuntu@ip-10-0-1-152:~/tensorflow$ sudo pip --version pip 9.0.1 从 /usr/local/lib/python3.4/dist-packages/pip-9.0.1-py3.4.egg (python 3.4)

      【讨论】:

        【解决方案4】:

        (venv) C:\Users\admin\PycharmProjects\MyProject\venv\Scripts>python -m pip install --upgrade pip 要求已经是最新的:c:\users\admin\pycharmprojects\myproject\venv\lib\site-packages (20.0.2) 中的 pip (20.0.2)

        (venv) C:\Users\admin\PycharmProjects\MyProject\venv\Scripts>pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.1-py2-none-any.whl tensorflow-1.0.1-py2-none-any.whl 不是该平台支持的轮子。 您使用的是 pip 版本 10.0.1,但版本 20.0.2 可用。 您应该考虑通过“python -m pip install --upgrade pip”命令进行升级。

        enter image description here

        【讨论】:

          猜你喜欢
          • 2020-07-18
          • 2020-04-05
          • 2017-01-09
          • 2018-03-30
          • 1970-01-01
          • 1970-01-01
          • 2018-09-09
          • 2021-04-29
          相关资源
          最近更新 更多