国内阿里pip源:
http://mirrors.aliyun.com/pypi/simple/
pip安装,点击下面链接
查看最新tensorflow支持的安装包:
https://pypi.python.org/pypi/tensorflow/
文件名里cp35 cp36 就是指cpython的版本
安装python,切记不要装在C盘,python如果安装在C盘,安装.whl文件时会出现没有权限错误
安装tensorflow步骤:
从阿里pip源
下载tensorflow安装包:caicloud.tensorflow-2.1.0.tar.gz
把安装包放到E盘根目录下,进入E盘:E:
E:\>pip install caicloud.tensorflow-2.1.0.tar.gz
tensorflow-1.3.0-cp36-cp36m-win_amd64.whl
C:\>
pip3 install --upgrade tensorflow
C:\>
pip3 install --upgrade tensorflow-gpu
Linux安装请点击链接:
https://mirrors.tuna.tsinghua.edu.cn/help/tensorflow/
Site-wide
:
- On Unix the file may be located in /etc/pip.conf. Alternatively it may be in a "pip" subdirectory of any of the paths set in the environment variable XDG_CONFIG_DIRS (if it exists), for example/etc/xdg/pip/pip.conf.
- On macOS the file is: /Library/Application Support/pip/pip.conf
- On Windows XP the file is: C:\Documents and Settings\All Users\Application Data\pip\pip.ini
- On Windows 7 and later the file is hidden, but writeable at C:\ProgramData\pip\pip.ini
- Site-wide configuration is not supported on Windows Vista
C:\Users\Yopark100\AppData\Roaming\pip\pip.ini
内容如下:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com