What is the best way of installing Python's scientific libraries in MacPorts?

Ryan Schmidt ryandesign at macports.org
Tue Oct 5 22:12:46 UTC 2021



On Oct 3, 2021, at 16:05, Artemio González López wrote:

> I then deactivated python39 and py39-jupyter, and installed py37-jupyter. It gave me numerous errors complaining that I had to activate by hand several ports (liek, e.g., sudo port -f activate py37-ipython),

You should virtually never need to force activate a port. If you do, it indicates there is a problem somewhere.

When you tried to activate a port, it presumably told you it could not because the files it wanted to install were already there.

If MacPorts said the files were provided by another MacPorts port, then the solution is not to force activate but to deactivate the other port first. In addition, file a bug report with us because we have evidently neglected to declare a conflict between the two ports.

If on the other hand MacPorts said the conflicting file was not provided by a port, then it could indicate that something wrote files into the MacPorts prefix behind MacPorts' back, such as a third-party installer or perhaps (in the case of python modules) manually running pip. The solution is to find out what that other thing was and uninstall it, bearing in mind that that other installation may not only have added files but may also have overwritten files MacPorts installed. In this situation, the best course of action is often to uninstall all ports and reinstall them, since it's difficult to know the extent of the damage that a badly-written third-party installer could cause.



More information about the macports-users mailing list