TensorFlow环境搭建-2.安装

wylc123 1年前 ⋅ 738 阅读

安装 TensorFlow:只支持64位机器,否则报错(python版本不对应也会报下错)

tensorflow-0.6.0-cp34-none-linux_x86_64.whl is not a supported wheel on this platform.

下载地址:

https://pypi.org/project/tensorflow/#files

https://pypi.org/project/tensorflow/1.10.0/#files


For Python 2:
1 # Ubuntu/ Linux 64-bit , CPU only:
2 $ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.6.0-cp27-none-linux_x86_64.whl

1 # Ubuntu/ Linux 64-bit , GPU enabled:
2 $ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.6.0-cp27-none-linux_x86_64.whl

1 # Mac OS X, CPU only:
2 $ sudo easy_install --upgrade six
3 $ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow -0.6.0-py2-none-any.whl

For Python 3:
基于 Python 3 的 TensorFlow 安装:
1 # Ubuntu/ Linux 64-bit , CPU only:
2 $ sudo -H pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.6.0-cp34-none-linux_x86_64.whl

1 # Ubuntu/ Linux 64-bit , GPU enabled:
2 $ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow -0.6.0-cp34-none-linux_x86_64.whl

1 # Mac OS X, CPU only:
2 $ sudo easy_install --upgrade six
3 $ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow -0.6.0-py3-none-any.whl
问题:

使用sudo pip install ......的时候出现下面一段黄色的代码:
The directory '/home/stone/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/stone/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
解决方法:
 
在sudo 后面添加-H
sudo -H pip install ......

 

更多内容请访问:IT源点

相关文章推荐

全部评论: 0

    我有话说: