Python 3.8.2 - Macports configuration problem

Dr M J Carter Martin.Carter at physics.ox.ac.uk
Fri May 1 08:17:19 UTC 2020


On Thu, Apr 30, 2020 at 11:13:45PM +0200, Max Anglad wrote:

> 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)

That'll break Python and/or MacPorts: consider if one of the Python
packages in MacPorts gets updated, or if you happen to later install a
MacPorts port which pulls in a Python package which conflicts with one
you've hand-installed.  There's better ways to layer your own packages
on top of a Python installation without using sudo, of which setting
up a virtual Python under your home directory is the newest and most
highly recommended.  A web search for "virtual python" should be most
fruitful.

Apologies if I come across as strident: I've seen the same mistakes
being made by postgrads for entirely too long, and this bear trap in
particular seems to claim more of them than most.  Good luck in your
Python endeavours.

-- 
Dr Martin J Carter
Computer System Administrator (WFH)
Astrophysics, University of Oxford


More information about the macports-users mailing list