How to enforce a particular Python version during port build

Christopher Chavez chrischavez at gmx.us
Sun Sep 1 00:52:12 UTC 2019


> On Aug 31, 2019, at 7:30 PM, Ralph Seichter <abbot at monksofcool.net> wrote:
> 
>> You’ll want to avoid the PATH approach as it requires that
>> ${prefix}/bin/python be symlinked to a Python 3.x, which isn’t always
>> the case.
> 
> Not always, but it is for me:
> 
>  $ ls -dl /opt/local/bin/python
>  lrwxr-xr-x  1 root  admin    24B 11 Jul 16:50 /opt/local/bin/python@ -> /opt/local/bin/python3.7

It’s up to the user whether this is the case; the ${prefix}/bin/python symlink is normally managed using `port select python`, so in your case you likely ran `port select python python37` at some point.



More information about the macports-dev mailing list