简体   繁体   English

Tensorflow安装错误:Ubuntu 16.04上的GPU版本

[英]Tensorflow installation error: GPU version on Ubuntu 16.04

I have tried to install gpu version of tensorflow from following 2 method but getting same error at last step: 我试图从以下2方法安装gpu版本的tensorflow,但在最后一步得到相同的错误:

https://alliseesolutions.wordpress.com/2016/09/08/install-gpu-tensorflow-from-sources-w-ubuntu-16-04-and-cuda-8-0-rc/ https://alliseesolutions.wordpress.com/2016/09/08/install-gpu-tensorflow-from-sources-w-ubuntu-16-04-and-cuda-8-0-rc/

https://pythonprogramming.net/how-to-cuda-gpu-tensorflow-deep-learning-tutorial/ https://pythonprogramming.net/how-to-cuda-gpu-tensorflow-deep-learning-tutorial/

Error is 错误是

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 448, in _prepare_file
    req_to_install, finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 387, in _check_skip_installed
    req_to_install.check_if_exists()
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 1011, in check_if_exists
    self.req.project_name
AttributeError: 'Requirement' object has no attribute 'project_name'

Your best bet is to use our official installation procedures: https://www.tensorflow.org/versions/r0.11/get_started/os_setup.html 您最好的选择是使用我们的官方安装程序: https//www.tensorflow.org/versions/r0.11/get_started/os_setup.html

For questions on build/install, we monitor issues on http://github.com/tensorflow/tensorflow/issues . 有关构建/安装的问题,我们会在http://github.com/tensorflow/tensorflow/issues上监控问题。

I think I found it. 我想我找到了。 It is because of old pip version. 这是因为旧的pip版本。 I am unable to update pip in the targeted folder because I was using anaconda2. 我无法更新目标文件夹中的pip,因为我使用的是anaconda2。 Once I switched back to default python2.7 and upgraded the pip, it worked. 一旦我切换回默认的python2.7并升级了pip,它就可以工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM