How to enforce a particular Python version during port build

Ralph Seichter abbot at
Sat Aug 31 23:15:59 UTC 2019

I am wrestling with a port that requires Python >=3.5 to build, and
Python 3.7 is the chosen one:

  $ which python
  $ python --version
  Python 3.7.4

Looks good to me. However, the build log shows the following:

  :info:build Python 3.5 or greater required, but you have Python 2.7.16

Seems like Apple's Python 2.7 is being used. I have already tried adding
'build.env PATH=/opt/local/bin:$env(PATH)' to the Portfile, but this did
not resolve the issue. What am I missing?


More information about the macports-dev mailing list