Dear Thomas, 2017-05-04 13:08 GMT+02:00 Thomas Ruedas <trg...@gmail.com>: > PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/:$PYTHONPATH
the problem is the PYTHONPATH variable, which should not point to a Python version different from the one you are using. Also, if you are using the MacPorts-provided Python, there is no need to set PYTHONPATH, so my recommendation is to simply delete that line. After deleting that line (and opening a new Terminal) you should get a working Python 3.5 (the error for 'import sip' was not the only one). > Macports seems to have amended my .profile on earlier occasions when I made > Python upgrades, and I have never touched them. Actually, the $PATH > modification appears three times there, because apparently it was never > checked whether it was already there. MacPorts edits the .profile only when you update MacPorts itself, not when you update single ports. Also, it only adds /opt/local/bin in front of the PATH and doesn't set PYTHONPATH. Those lines in your .profile come from a different source. If you want to use only MacPorts' Pythons I would get rid also of the lines setting the PATH: > PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" > export PATH and ensure instead that /opt/local/bin is the first path in PATH, as MacPorts sets it. Best wishes. Davide _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users