简体   繁体   中英

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? It can be done on Ubuntu, Debian, Gentoo, and FreeBSD via the command posted below except Mac OS.

Apparently this command will work but my Terminal says it can't find setup.py.

$ python setup.py install

You need to:

  1. Download httplib2 onto your computer
  2. cd into the directory when you unpacked httplib2
  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). 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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