tensorflow windows10下 超简单安装教程

首先安装python3,版本3.几都可以,可以自行百度。

然后cmd,输入python,检查是否安装成功:


然后修改pip源:

在C:\Users\用户名\下创建文件夹pip,然后新建一个文本文档,将文件名全部修改为pip.ini,注意要连同扩展名一块更改。

文件内容修改为:

[global]
index-url = https://mirrors.aliyun.com/pypi/simple/ 

注意不要有多余的空格,这一步是为了之后下载不用每步都写源程序网址,因为国外网站的问题,下载很慢,会使你的安装过程无故放大好多倍。

【这块遇到了一些错误,我一并注释到这里:】

一开始源文件写的是

index-url = http://mirrors.aliyun.com/pypi/simple/

有错

pip list发现:

C:\Users\Administrator>pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
pip (9.0.3)
setuptools (39.0.1)
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

tensorflow windows10下 超简单安装教程_第1张图片

C:\Users\Administrator>python -m pip install --upgrade pip
The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.aliyun.com'.
Requirement already up-to-date: pip in d:\python3\lib\site-packages
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

tensorflow windows10下 超简单安装教程_第2张图片

然后

tensorflow windows10下 超简单安装教程_第3张图片

C:\Users\Administrator>pip install numpy
Collecting numpy
  The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.aliyun.com'.
  Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

才发现问题,改为https

接下来:

pip install numpy

>python -m pip install --upgrade pip

pip list结果:

tensorflow windows10下 超简单安装教程_第4张图片

>pip install tensorflow


安装成功:

tensorflow windows10下 超简单安装教程_第5张图片


打开pycharm,在设置中

tensorflow windows10下 超简单安装教程_第6张图片

apply

ok

可以运行你的程序了

tensorflow windows10下 超简单安装教程_第7张图片

你可能感兴趣的:(机器学习)