我试过了:
$ pip install tensorflow
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 272, in run
with self._build_session(options) as session:
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/lib/python2.7/site-packages/pip/download.py", line 336, in __init__
retries = urllib3.Retry(
AttributeError: 'module' object has no attribute 'Retry'
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 233, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 251, in main
timeout=min(5, options.timeout)) as session:
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/lib/python2.7/site-packages/pip/download.py", line 336, in __init__
retries = urllib3.Retry(
AttributeError: 'module' object has no attribute 'Retry'
那:
$ pip3 install tensorflow
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 272, in run
with self._build_session(options) as session:
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/lib/python3.6/site-packages/pip/download.py", line 336, in __init__
retries = urllib3.Retry(
AttributeError: module 'pip' has no attribute 'Retry'
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
sys.exit(main())
File "/usr/lib/python3.6/site-packages/pip/__init__.py", line 233, in main
return command.main(cmd_args)
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 251, in main
timeout=min(5, options.timeout)) as session:
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/lib/python3.6/site-packages/pip/download.py", line 336, in __init__
retries = urllib3.Retry(
AttributeError: module 'pip' has no attribute 'Retry'
但无济于事。我重新安装了python [23] -pip *和python [23] -urllib3,但没有任何改变。
我不知道这是否与TensorFlow或某些pip / urllib3相关。有人可以帮忙吗?我想安装TF,但也许还有其他问题需要先修复?看起来像一些依赖性问题...