下载源码
[root@bogon python_auto]# wget https://pypi.python.org/packages/source/I/IPy/IPy-0.81.tar.gz –no-check-certificate
加压缩
[root@bogon python_auto]# tar zxvf IPy-0.81.tar.gz
安装
[root@bogon IPy-0.81]# python setup.py install
running install
running build
running build_py
creating build
creating build/lib
copying IPy.py -> build/lib
running install_lib
copying build/lib/IPy.py -> /usr/lib/python2.6/site-packages
byte-compiling /usr/lib/python2.6/site-packages/IPy.py to IPy.pyc
running install_egg_info
Writing /usr/lib/python2.6/site-packages/IPy-0.81-py2.6.egg-info
测试:
[root@bogon IPy-0.81]# python
Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import IPy
可以看到这个第三方模块可以成功导入