我收到安装错误,因为pip找不到setup.py。
sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
我收到此错误消息。
Downloading/unpacking https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Downloading tensorflow-0.5.0-cp27-none-linux_x86_64.whl (10.9Mb): 10.9Mb downloaded
Running setup.py egg_info for package from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-GdGgbz-build/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-GdGgbz-build/setup.py'
谁能告诉我如何解决这个问题?
感谢。
答案 0 :(得分:10)
来自https://github.com/tensorflow/tensorflow/issues/56
要输入的命令是&#34; pip install --upgrade pip&#34; ,这应该是 在他们告诉用户之后立即添加到说明中 &#34;来源bin /激活&#34;
答案 1 :(得分:3)
尝试使用pip install升级protobuf:
sudo pip install --upgrade protobuf
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/protobuf-3.0.0b2.post2-cp27-none-any.whl
为我工作。 documentation为各种安装问题提供了许多解决方案。
答案 2 :(得分:2)
Tensorflow需要python -V 2.7。因为,很多机器使用稳定的2.6版python进行系统构建,我建议并行/替代安装python 2.7。然后你可以用2.7版本的python解释器安装pip。请参阅以下内容:
#sudo wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
#sudo python2.7 ez_setup.py
#easy_install-2.7 pip
#sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
答案 3 :(得分:0)
我正在使用ubuntu 12.04 64位。 我通过以下方式解决了这个问题:
mkdir -p ~/code/download/lib/tensorflow/
cd ~/code/download/lib/tensorflow/
virtualenv --system-site-packages tensorflow_for_ubuntu12_04_64bit_python2_7
source tensorflow_for_ubuntu12_04_64bit_python2_7/bin/activate
cd tensorflow_for_ubuntu12_04_64bit_python2_7
pip install --upgrade tensorflow
答案 4 :(得分:0)
您运行sdist的文件名必须命名为setup.py
像setup_something.py
那样运行文件将失败