windows 下安装ipython
直接上命令吧
pip3 install ipython --trusted-host mirrors.aliyun.com
我用的是python3.7,安装目录在:C:\Users\用户名\AppData\Local\Programs\Python\Python37
所以在命令行里先进入这个文件夹。然后输入上面的命令,镜像是阿里云,国内速度比较快
下面放一些镜像:
阿里云 速度最快 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
Python官方 https://pypi.python.org/simple/
v2ex http://pypi.v2ex.com/simple/
中国科学院 http://pypi.mirrors.opencas.cn/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
下面几步比较关键
但是在AppData\Roaming里并没有pip3文件夹,于是就在AppData\Roaming建一个pip3文件夹,在pip文件夹里再建一个pip3.ini文件,然后把下面的加到这个文件里就可以了。
[global]
index-url = http://mirrors.aliyun.com/pypi/simple
配好之后输入下面的命令:
pip install <包名> --trusted-host mirrors.aliyun.com
下载安装包就会特别的快啦!
大家注意,一般装完ipython之后会安装jupyter或者ipython notebook,所以多半会失败。
如果安装jupyter失败的话,主要原因是因为网络,使用国内镜像加速即可
命令如下:
pip3 install --user jupyter -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
好了,安装成功!!!