How to specify install order for python pip?

后端 未结 9 1535
[愿得一人]
[愿得一人] 2020-11-30 02:22

I\'m working with fabric(0.9.4)+pip(0.8.2) and I need to install some python modules for multiple servers. All servers have old version of setuptools (0.6c8) which needs to

9条回答
  •  余生分开走
    2020-11-30 02:56

    I ended up running pip inside virtualenv instead of using "pip -E" because with -E pip could still see servers site-packages and that obviously messed up some of the installs.

    I also had trouble with servers without virtualenvs. Even if I installed setuptools with separate pip command pymongo would refuse to be installed.

    I resolved this by installing setuptools separately with easy_install as this seems to be problem between pip and setuptools.

    snippets from fabfile.py:

    env.activate = "source %s/bin/activate" % virtualenv_path
    
    _virtualenv("easy_install -U setuptools")
    _virtualenv("pip install -r requirements.txt")
    
    def _virtualenv(command)
        if env.virtualenv:
            sudo(env.activate + "&&" + command)
        else:
            sudo(command)
    

    I had these problems with pip 0.8.3 and 0.8.2.

提交回复
热议问题