Pip using system python osx

前端 未结 5 1739
醉话见心
醉话见心 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条回答
  •  逝去的感伤
    2021-02-03 14:20

    Here is my setup to get pip working with macports and set py26-pip as the default pip

    sudo port install py26-pip && sudo port select --set pip py26-pip
    

    after install finishes run to see the help information for pip

    pip --help
    

    after you may need to update your path to include the bin files installed by pip edit .bash_profile to include something like

    export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:$PATH
    

提交回复
热议问题