ImportError: No module named pip

前端 未结 19 748
时光取名叫无心
时光取名叫无心 2020-12-04 06:56

OS: Mac OS X 10.7.5 Python Ver: 2.7.5

I have installed setuptools 1.0 with ez_setup.py from https://pypi.python.org/pypi/setuptools Then I download pip.1.4.1 pkg fr

19条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 07:46

    Tested below for Linux: You can directly download pip from https://pypi.org/simple/pip/ untar and use directly with your latest python.

    tar -xvf  pip-0.2.tar.gz
    cd pip-0.2
    

    Check for the contents.

    anant$ ls
    docs  pip.egg-info  pip-log.txt  pip.py  PKG-INFO  regen-docs  scripts  setup.cfg  setup.py  tests
    

    Execute directly:

    anant$ python pip.py --help
    Usage: pip.py COMMAND [OPTIONS]
    
    Options:
      --version             show program's version number and exit
      -h, --help            show this help message and exit
      -E DIR, --environment=DIR
                            virtualenv environment to run pip in (either give the
                            interpreter or the environment base directory)
      -v, --verbose         Give more output
      -q, --quiet           Give less output
      --log=FILENAME        Log file where a complete (maximum verbosity) record
                            will be kept
      --proxy=PROXY         Specify a proxy in the form
                            user:passwd@proxy.server:port. Note that the
                            user:password@ is optional and required only if you
                            are behind an authenticated proxy.  If you provide
                            user@proxy.server:port then you will be prompted for a
                            password.
      --timeout=SECONDS     Set the socket timeout (default 15 seconds)
    

提交回复
热议问题