Python 2.7 on System, PIP and Virtualenv still using 2.6 - How do I switch them to use 2.7

前端 未结 3 2031
Happy的楠姐
Happy的楠姐 2021-01-02 15:16

I am on MacOSx 10.6.8 and I have python 2.7 installed

python -v produces:

Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Appl         


        
3条回答
  •  -上瘾入骨i
    2021-01-02 15:39

    I had a similar problem, virtualenv python was picking up the 2.7.6 system python from /usr/bin/python rather than the 2.7.9 version in /usr/local/bin/python

    I had to do:

    sudo pip uninstall virtualenv
    

    Then I installed setuptools like so:

    curl https://bootstrap.pypa.io/ez_setup.py -o - | python
    

    Then I installed pip with that new version of setuptools like so:

    easy_install pip
    

    Then I installed virtualenv

    pip install --upgrade virtualenv
    

提交回复
热议问题