Pip using system python osx

前端 未结 5 1738
醉话见心
醉话见心 2021-02-03 13:34

I installed python26 using macports, so the correct python on my system is /opt/local/bin/python

However, when I do

sudo pip install 

        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-03 14:20

    Remove pip from /usr/local/bin with sudo rm /usr/local/bin/pip.

    If you have installed pip with macports, which pip should then show /opt/local/bin/pip. If not, install pip again by following the instructions here. As long as which python shows the /opt/local installation, it should work. If it doesn't, you will need to edit your PATH env variable.

提交回复
热议问题