我尝试从以下2方法安装gpu版本的tensorflow,但在最后一步得到同样的错误:
https://pythonprogramming.net/how-to-cuda-gpu-tensorflow-deep-learning-tutorial/
错误是
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'
答案 0 :(得分:0)
您最好的选择是使用我们的官方安装程序: https://www.tensorflow.org/versions/r0.11/get_started/os_setup.html
有关构建/安装的问题,我们会监控http://github.com/tensorflow/tensorflow/issues上的问题。
答案 1 :(得分:0)
我想我找到了它。这是因为旧的pip版本。我无法更新目标文件夹中的pip,因为我使用的是anaconda2。一旦我切换回默认的python2.7并升级了pip,它就可以了。