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

前端 未结 3 2043
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条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-02 15:53

    My guess is that both pip and virtualenv are from the 2.6 distro. You can check which one the system users with which pip. If you do have other pip/virtualenv install (use which -a pip to find all of them) it might be that you need to tweak your PATH environment variable.

    Another thing to note is the installed Python scripts usually have full path to the Python executable. You can see which python pip is using by running head $(which pip)

提交回复
热议问题