当前位置: 首页 > 工具软件 > httplib2 > 使用案例 >

python 安装httplib2 0.9.2 或使用pip安装

杜阳泽
2023-12-01

1、首先下载httplib2 0.9.2,下载地址:

https://pypi.python.org/pypi/httplib2/#downloads

2、然后解压到Python27的安装目录下,将下载的httplib2 0.9.2解压后的文件夹名字修改为httplib

3、通过dos命令进入cmd

C:\Users\Administrator>cd:d\Python27\httplib
C:\Users\Administrator>d:
d:\Python27\httplib>python setup.py install
python不是内部命令

出现错误,因为Python没有设置环境变量

;D:\Python27\;D:\Python27\Scripts

验证Python是否设置了环境变量

C:\Users\Administrator>python
Python 2.7.5...
>>>

 

重新安装httplib

C:\Users\Administrator>cd:d\Python27\httplib
C:\Users\Administrator>d:
d:\Python27\httplib>python setup.py install
running install
...
d:\Python27\httplib>

使用pip安装

[root@localhost enc_service]#  which -a python
/usr/bin/python

[root@localhost enc_service]# pip -V
pip 18.0 from /usr/lib/python2.7/site-packages/pip (python 2.7)

[root@localhost enc_service]# pip install httplib2
Collecting httplib2
  Downloading https://files.pythonhosted.org/packages/fd/ce/aa4a385e3e9fd351737fd2b07edaa56e7a730448465aceda6b35086a0d9b/httplib2-0.11.3.tar.gz (215kB)
    100% |████████████████████████████████| 225kB 151kB/s 
Building wheels for collected packages: httplib2
  Running setup.py bdist_wheel for httplib2 ... done
  Stored in directory: /root/.cache/pip/wheels/1b/9c/9e/1f6fdb21dbb1fe6a99101d697f12cb8c1fa96c1587df69adba
Successfully built httplib2
Installing collected packages: httplib2
Successfully installed httplib2-0.11.3
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

 

 类似资料: