I finally managed to use Python correctly from Macports

I first deleted the installation performed by the installer of python.org :

- /Library/Frameworks/Python.framework (Thanks Chris Jones and Ryan Schmidt for 
the reference to the Macports FAQ)
- /Application/Python 3.8
- links that was no longer needed in /usr/local/bin

and I substituted /Library/Frameworks/Python.framework/Versions/3.8/bin 
by 
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin in the PATH 
defined in ~/.bash_profile)


Then finally I reloaded the main Python pakages that I was using (about ten 
that brought me 70 sub-packages)

Note that pip (python package installer) must apparently be used via sudo if 
you want the packages to be installed in the right place
(/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages)
because the Python files and directories brought by Macport belong to 
root/wheel unlike those of the python.org installer who belong to root/admin 
(and as a MacOS administrator we belong to the admin group and not to wheel 
group)

And since I didn't want to change the group or the file protection brought back 
by Python Macports, sudo was the simplest solution.

@ Uli Wienands: I was also under Snow Leopard (10.6) before switching to El 
Capitan (10.11) because too many applications could no longer
be updated. 
To keep the possibility of running PPC applications under El Capitan I 
installed a Snow Leopard Server in a VMWare Fusion, and it works :-)

But it is true that there is a risk when updating Macports, it can be limited 
by making prior backups with Time Machine or Carbon Copy Cloner.

Reply via email to