Python installation

本文介绍了如何在不同操作系统上安全地安装Python包管理器pip,包括安装过程、升级setuptools以及使用pip安装特定库如xlrd的方法。

 

PIP:
Python & OS Support

pip works with CPython versions 2.6, 2.7, 3.2, 3.3, 3.4 and also pypy.

pip works on Unix/Linux, OS X, and Windows.

pip included with Python

Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default [1], so you may have pip already.

Install pip

To install pip, securely download get-pip.py[2]

Then run the following (which may require administrator access):

python get-pip.py

If setuptools is not already installed, get-pip.py will install setuptools for you. [3]

To upgrade an existing setuptools, run pip install -U setuptools.

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

Install to the user site [4]:

python get-pip.py --user

Install behind a proxy:

python get-pip.py --proxy="[user:passwd@]proxy.server:port"

setuptools安装好后,
(1)cd /d E:\pip-7.1.2
(2)python setup.py install
https://pypi.python.org/pypi/pip

xlrd

xlrd 0.9.4

Library for developers to extract data from Microsoft Excel (tm) spreadsheet files

Extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on any platform. Pure Python (2.6, 2.7, 3.2+). Strong support for Excel dates. Unicode-aware.

(1)cd /d E:\xlrd-0.9.4
(2)python setup.py install

E:\xlrd-0.9.4>python setup.py install
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\xlrd
copying xlrd\biffh.py -> build\lib\xlrd
copying xlrd\book.py -> build\lib\xlrd
copying xlrd\compdoc.py -> build\lib\xlrd
copying xlrd\formatting.py -> build\lib\xlrd
copying xlrd\formula.py -> build\lib\xlrd
copying xlrd\info.py -> build\lib\xlrd
copying xlrd\licences.py -> build\lib\xlrd
copying xlrd\sheet.py -> build\lib\xlrd
copying xlrd\timemachine.py -> build\lib\xlrd
copying xlrd\xldate.py -> build\lib\xlrd
copying xlrd\xlsx.py -> build\lib\xlrd
copying xlrd\__init__.py -> build\lib\xlrd

https://pypi.python.org/pypi/xlrd

 

 




 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值