window离线安装pip, wheel, numpy,matplotlib
2016-04-13 20:26
567 查看
由于电脑无法联网,只能离线安装, 电脑里只有python 2.7, 下面是安装步骤, 所有的安装包都可以在下面的官网网站下载:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
https://pip.pypa.io/en/stable/installing/
该文件是在线下载安装, 而里面也介绍了安装本地pip副本的方法:
安装时的可选项:
get-pip.py options
–no-setuptools
If set, don’t attempt to install setuptools
–no-wheel
If set, don’t attempt to install wheel
Additionally, get-pip.py supports using the pip install options and the general options. Below are some examples:
Install from local copies of pip and setuptools:
python get-pip.py –no-index –find-links=/local/copies
上面的/local/copy是放pip安装文件的路径
由于我没有下载wheel 和setuptools, 所以这两个不安装, 将pip…whl和get-pip.py放到一个地方,我放在d:盘, 所以的cmd下运行下面的命令:
OK
注意:这里如果出现错误”numpy-1.11.0+mkl-cp27-cp27-win-amd64.whl is not a supported wheel on this platform”,那是因为你安装的pip wheel是32位的,而numpy是64位, 所以将numpy安装包换成32位的即可
Matplotlib, a 2D plotting library.
Requires numpy, dateutil, pytz, pyparsing, cycler, setuptools, and optionally pillow, pycairo, tornado, wxpython, pyside, pyqt4, ghostscript, miktex, ffmpeg, mencoder, avconv, or imagemagick.
上面几个加粗的是必须安装的依赖包, 还有一个 six 包也必须要安装, 下载这几个包后, 依次用pip安装: pyparsing ; pytz; setuptools; six; cycler; pytz; python-deteutil; matplotlib;
OK
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
1. pip安装
下载对应版本的pip.whl后, 还要在该网站下载里面的get-pip.py:https://pip.pypa.io/en/stable/installing/
该文件是在线下载安装, 而里面也介绍了安装本地pip副本的方法:
安装时的可选项:
get-pip.py options
–no-setuptools
If set, don’t attempt to install setuptools
–no-wheel
If set, don’t attempt to install wheel
Additionally, get-pip.py supports using the pip install options and the general options. Below are some examples:
Install from local copies of pip and setuptools:
python get-pip.py –no-index –find-links=/local/copies
上面的/local/copy是放pip安装文件的路径
由于我没有下载wheel 和setuptools, 所以这两个不安装, 将pip…whl和get-pip.py放到一个地方,我放在d:盘, 所以的cmd下运行下面的命令:
python get-up.py --no-setuptools --no-wheel --find-links=d:\
OK
2 . wheel安装
由于numpy.whl的安装需要wheel, 所以在前面的连接里下载wheel, 这次用pip命令安装:pip install wheel-0.29......whl
3 . numpy.whl安装
运行pip inistal "numpy-1.11.0+mkl-cp27-cp27m-win32.whl"
注意:这里如果出现错误”numpy-1.11.0+mkl-cp27-cp27-win-amd64.whl is not a supported wheel on this platform”,那是因为你安装的pip wheel是32位的,而numpy是64位, 所以将numpy安装包换成32位的即可
4. 安装matlablib
这个包依赖好几个包,看前面网站上下载点的介绍:Matplotlib, a 2D plotting library.
Requires numpy, dateutil, pytz, pyparsing, cycler, setuptools, and optionally pillow, pycairo, tornado, wxpython, pyside, pyqt4, ghostscript, miktex, ffmpeg, mencoder, avconv, or imagemagick.
上面几个加粗的是必须安装的依赖包, 还有一个 six 包也必须要安装, 下载这几个包后, 依次用pip安装: pyparsing ; pytz; setuptools; six; cycler; pytz; python-deteutil; matplotlib;
OK
相关文章推荐
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- install and upgrade scrapy
- Scrapy的架构介绍
- Centos6 编译安装Python
- 使用Python生成Excel格式的图片
- 让Python文件也可以当bat文件运行
- [Python]推算数独
- Python中zip()函数用法举例
- Python中map()函数浅析
- Python将excel导入到mysql中
- Python在CAM软件Genesis2000中的应用
- 使用Shiboken为C++和Qt库创建Python绑定
- FREEBASIC 编译可被python调用的dll函数示例
- Python 七步捉虫法