MacPorts Reference
Upgrade cycle:
port selfupdate && port -p upgrade outdated && port uninstall inactive
Going from python 3.5+3.6 to python 3.7:
port -q echo requested|grep ^py35 > macports.requested
port -q echo installed|grep ^py35 > macports.installed
pip-3.5 list | awk '{print $1}' > pip.installed
port uninstall py35-\* py36-\*
port uninstall python35 python36
port install python37 py37-pip
port select --set pip pip37
port select --set pip3 pip37
port install `cat macports.requested|sed s/py35-/py37-/g`
pip-3.7 list | awk '{print $1}' > pip.installed-3.7
cat pip.installed*|sort|uniq -c|grep '^ 1'|awk '{print $2}'>pip.missing-3.7
pip-3.7 install `cat pip.missing-3.7` # or install when needed
# clean up /opt/local/Library/Frameworks/Python.framework/ manually
Back to Knowledge Base.