python从入门到精通-1 pycharm&python安装
一、 pycharm下载安装
pycharm下载地址:
http://www.jetbrains.com/pycharm/download/#section=windows
在这里插入图片描述
二、 python下载安装
下载地址:https://www.python.org/
![在这里插入图片描述](https://img-blog.csdnimg.cn/9049d37445524cb7ad315f51414d2159.png)
三、pycharm上配置python
双击桌面pycharm![在这里插入图片描述](https://img-blog.csdnimg.cn/1a8aadf15ed045a5b0e3bdf84eeaa906.png)
随便取个名字(我取的学习),直接点击create.遇到如下情况,则点击ok
添加解释器
四、配置镜像源
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/
-
pycharm内部配置
-
手动添加镜像源
pip install 下载的模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
- 永久配置镜像源
方法一:
到cmd执行如下命令创建pip.ini:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
然后我们把这个路径添加到系统环境变量就好了
方法二:
如果刚刚这个命令你执行失败,你可以自己在c盘任意找个位置创建一个文件名叫做pip文件夹,在这下面下创建一个文件名pip.ini,内容为
1.[global]
2. index-url = https://pypi.tuna.tsinghua.edu.cn/simple
然后添加到环境变量。