在安装TensorFlow时获取``没有名为队列的模块''

时间:2018-09-16 11:44:41

标签: python-2.7 tensorflow pip anaconda

我正在使用Anaconda并尝试通过pip安装tensorflow,但是我收到以下错误消息,我不确定下一步该怎么做?

Traceback (most recent call last):
  File "/home/xieyangyang/anaconda3/envs/tensorflow1/bin/pip", line 7, in <module>
    from pip._internal import main
  File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_internal/__init__.py", line 20, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
  File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_vendor/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/home/xieyangyang/anaconda3/envs/tensorflow1/lib/python2.7/site-packages/pip/_vendor/urllib3/connectionpool.py", line 44, in <module>
    from .util.queue import LifoQueue
ImportError: No module named queue

1 个答案:

答案 0 :(得分:2)

也许只是重新安装pip而没有pip

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

有关更多信息,请参见https://pip.pypa.io/en/stable/installing/