简体   繁体   English

如何在Mac上安装python的httplib2?

[英]How do I install python's httplib2 on a mac?

OS: Mac OSx 10.8.3
IDE: Eclipse w/ PyDev

How do I properly install httplib2 on a Mac? 如何在Mac上正确安装httplib2 It can be done on Ubuntu, Debian, Gentoo, and FreeBSD via the command posted below except Mac OS. 除了Mac OS之外,还可以通过以下命令在Ubuntu,Debian,Gentoo和FreeBSD上完成此操作。

Apparently this command will work but my Terminal says it can't find setup.py. 显然,该命令可以使用,但是我的终端机说找不到setup.py。

$ python setup.py install

You need to: 你需要:

  1. Download httplib2 onto your computer 将httplib2下载到您的计算机上
  2. cd into the directory when you unpacked httplib2 解压缩httplib2时,将cd放入目录
  3. Run the command there 在那里运行命令

Alternately, you can run: 或者,您可以运行:

~$ python /path/to/httplib2/setup.py install

from anywhere. 从任何地方。

Please note that this will install httplib2 into your system's Python (unless you have done something to change what python is pointing to). 请注意,这会将httplib2安装到系统的Python中(除非您做了一些更改来更改python指向的内容)。 You may want to look at Python's virtual environments and pip (PIP Installs Python) tool for managing your dependencies without changing your system Python. 您可能需要查看Python的虚拟环境和pip (PIP安装Python)工具来管理依赖项,而无需更改系统Python。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM