I want to have multiple versions of Python 3 on MacOS. For example I need Python3.6 and Python3.7. When using Linux I would simply create an alt install by building Python from source, as follows:
- Download the source tarball for a specific Python version and extract
- ./configure
- sudo make
- sudo make altinstall
I will then have a new version of Python installed in usr/local/lib/pythonx.x
.
That works perfectly on Linux. How would I go about having access to multiple versions of Python 3 on MacOS?
EDIT: Just to clarify my use case a bit more. I use multiple versions on Python installed on the OS so that I can then use Pipenv for different projects specifying different Python versions.
.pkg
installers from Python website. Multiple versions are installed to/Library/Frameworks/Python
(or similar), the only thing is adjusting thePATH
in.bash_profile
to use them. – Canaster