背景
在书learn python the hardway的EX46练习中,需要安装pip
,setuptools
等模块。
由于网上找到的资料过时,在此记录Windows10下的安装过程。
- pip from http://pypi.python.org/pypi/pip
- setuptools from https://pypi.python.org/pypi/setuptools
- distribute from http://pypi.python.org/pypi/distribute
- nose from http://pypi.python.org/pypi/nose/
- virtualenv from http://pypi.python.org/pypi/virtualenv
以pip为例,下载source file即可。

下载并解压PIP等文件,我的结构如下。

安装:
- 方法1(联网情况下)
使用官方说明的get-pip.py,并运行如下命令:
python get-pip.py
安装如下:

- 方法2(断网情况下)
在解压好的pip目录下运行
python setup.py install
之后的安装同理。
有了pip就可以自由管理自己的module了。
安装nose完毕后便可以测试自己的框架是否配置正确,
我的测试如下:

第一次test由于字符编码问题没有通过,改正后就通过了。
网友评论