您的位置:首页 > 编程语言 > Python开发

Win7,64位下Python3.5.2,安装numpy、matplotlib、scipy(whl文件)

2016-12-14 18:32 811 查看
win7,64位下,Python中安装numpy、matplotlib和scipy。

1、安装whl文件前,先通过pip命令安装wheel:

    cmd,进入到C:\Program Files\Python35\Scripts目录下,执行命令

    pip install wheel


 

链接:http://www.lfd.uci.edu/~gohlke/pythonlibs/

安装过程中需要的各种程序包都能在链接(非官方下载,比较全)里找到。

或到点击打开链接下载numpy、matplotlib和scipy的安装包whl文件。

2、安装numpy的whl文件:

    在C:\Program Files\Python35\Scripts目录下,运行pip命令,文件名写全路径

    pip install D:\FileTest\numpy-1.12.0b1-cp35-none-win_amd64.whl



3、安装matplotlib的whl文件:

    在C:\Program Files\Python35\Scripts目录下,运行pip命令,文件名写全路径

    pip install D:\FileTest\matplotlib-2.0.0rc1-cp35-cp35m-win_amd64.whl





4、安装scipy的whl文件:

    在C:\Program Files\Python35\Scripts目录下,运行pip命令,文件名写全路径

    pip install D:\FileTest\scipy-0.18.1-cp35-cp35m-win_amd64.whl



安装完成后,验证:

import matplotlib.pyplot as plt

plt.plot([1,2,3])  

plt.title('Test') 

plt.ylabel('some numbers')  

plt.show()  

上述代码保存到Test.py文件。

在Test.py文件所在目录中,运行命令 python Test.py



结果如下:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息