How to: Macports select python

后端 未结 5 1437
感动是毒
感动是毒 2020-11-28 06:26

When I enter:

port select --list python

This is the result:

Available versions for python:
    none
    python25 (active)
         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 07:07

    Python installs to:

    • Default (Apple): /usr/local/bin
    • MacPorts: /opt/local/bin
    • python.org: /Library/Frameworks/python...

    Default python is required by system so best not to mess with it too much. MacPorts Python convenient to use because getting packages so easy.

    You can set link as shortcut:

    sudo ln -s /opt/local/bin/python /usr/local/bin/ppython
    

    Then from command-line to use MacPorts version:

    ppython script.py
    

提交回复
热议问题