Python 3.8.2 - Macports configuration problem

Max Anglad max.anglad at
Fri May 1 11:52:14 UTC 2020

> On 1 May 2020 at 10:28, Christopher Jones <jonesc at> wrote :
>> On 1 May 2020, at 9:17 am, Dr M J Carter <Martin.Carter at> wrote:
>> 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.  

Ok, I understand,  and I didn't realize that most of the Python packages had also been "Macported".

(Note that I only use standard Python packages like matplotlib, scipy, pandas, jupyter,...)

But I see that there is however a port of the pip installer :

Do you also advise against using it ? Does it not install Macported Python packages in the right place ?

I find that documentation is missing on the correct way to use Python and its packages via Macports, or I did not find it

> I completely second the above. Do not use pip to install into the MacPorts prefix, you will run into a lot of problems doing this.
> In addition to the virtual env. approach, also note macports has its own ports for most of the commonly used python packages. Just run port search py38-
> to list them. Its quite probable that all you need is available in macports already.
> Chris

Ok, but these Macported packages I install them with py38-pip (python3 -m pip install <python-pkg>) 
or conventionally with : sudo port install <python-pkg> ?

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

In software development I have a long experience in C/C++ and shells under Unix, but I am still a beginner in Python and its mechanisms

Thank you all for your valuable advice.

More information about the macports-users mailing list