On Mac, current OS, system python is still 2.7. I've installed pyenv, and successfully installed 3.7.3.
dandonaldson@Dans-MacBook-Pro-2 gpt-2 % pyenv local
3.7.3
dandonaldson@Dans-MacBook-Pro-2 gpt-2 % pyenv global
3.7.3
dandonaldson@Dans-MacBook-Pro-2 gpt-2 %
If I now I try to install pipx, as a way to install packages, I get
dandonaldson@Dans-MacBook-Pro-2 gpt-2 % pip install --user pipx
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pipx
Using cached pipx-0.15.4.0.tar.gz (336 kB)
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fz/hkppw37x1tz20d3jv8rb3vmr0000gn/T/pip-install-u0WjuX/pipx/setup.py'"'"'; __file__='"'"'/private/var/folders/fz/hkppw37x1tz20d3jv8rb3vmr0000gn/T/pip-install-u0WjuX/pipx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/fz/hkppw37x1tz20d3jv8rb3vmr0000gn/T/pip-pip-egg-info-bKDh7q
cwd: /private/var/folders/fz/hkppw37x1tz20d3jv8rb3vmr0000gn/T/pip-install-u0WjuX/pipx/
Complete output (1 lines):
Python 3.6 or later is required. See https://github.com/pipxproject/pipx for installation instructions.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm told not to remove the python in */Frameworks, so it seems like I have to get around this while leaving that in place.
A previous shot using brew left me with
which python
python: aliased to /usr/local/bin/python3.8
and when I try this I get
brew uninstall python
Error: Refusing to uninstall /usr/local/Cellar/python@3.8/3.8.4
because it is required by imagemagick, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies python
So,...
- can I uninstall the brew python without the world ending? I have no python projects
- how can I get module packages to install by default in a place accessible to 3.7.3?
I've used rubyenv for many years, it's not this wretched… :(
Extra points: does Python and pyenv have the same behaviour of allowing python environments to have their own modules and versions?