I am on Mac using macports to install python3. I decided to follow macports path instead of direct Python3 download/install to keep it separate from Apple's native Python installs. I went with Python36 since it was compatible with a recently added LabView python node.
Since then I have added number of other packages via macports: numpy, scipy, Pillow, matplotlib, pandas, jupyter, spyder, ... All dependencies have been always taken care of, all worked as expected. I have even install PIP (py36-pip) although I have never used it.
Trouble began when I tried installing "jupyter_contrib_nbextensions". The package did not show as an available "macport". Reluctantly, I tried PIP ... all seemed well, but received slew of error messages during the build phase.
I am wondering. What is the proper protocol installing additional python packages when the primary python is installed via macports?
Perhaps, install python 3.x and corresponding PIP and manage all other packages with PIP rather than macports? Of course, all python packages would have to updated via PIP (currently everything is updated via macports, which is easy and convenient).
... or, since jupyter_contrib_nbextensions is the only non-working package I could find so far, hack it and install "manually" somehow?
Something else?
I appreciate your insights.
Cheers, Radek
(Late night) Update:
After reading extensive write-up on multiple python versions here: https://realpython.com/intro-to-pyenv/ I decided to remove all python
packages from macports
(a bit scary really, but the text on the mentioned web site was reasonably clear). Note, that one still needs macports
or homebrew
to install and build pyenv
After installing pyenv
it took a while to build python3.6. I can now switch between python
versions set either globally (any directory) or locally (only in that directory).
PIP
was a bit frustrating because it was not installed on the "system" python (in /usr/bin) but was installed on 3.6. I am just installing jupyter
in my local 3.6 versions .... extensions are coming next.
All worked out.
pyenv
all the way! R>