Near impossible to get started with Python on macOS
See original GitHub issueIs your feature request related to a problem? Please describe. I received an email from my brother who’s not a developer.
There is something wrong with developers.
I found a great Python script on a forum, where they said you just have to install Python 3.7+ and Pillow (
pip install pillow
) and voila.If only it was that simple! I spent four hours trying to get it to work – installing, searching, reading question after question on Stack Overflow, without finding a good answer to something as simple as: How to get a Python 3 script to run on macOS.
Even after having installed Python 3 with the official Mac installer, macOS insists on using Python 2 (which was officially deprecated a few days ago). The answers point to all different directions, with everyone being so assertive and nobody able to agree.
In the end I found a blog post by a Red Hat guy who had struggled with the same problem. Even he thought he had found the best solution, until a Python guru suddenly appears out of the blue with what actually is the best solution, one that apparently only he and other Python gurus knows about. And when I tried that, it worked at once!
I find it incredible that in 2020, you can download an official Python installer for macOS, which won’t work, won’t inform you that it won’t work, and won’t say what you should do to make it work.
Describe the solution you’d like Don’t expect people to magically understand all this. At least inform on the website what additional steps are needed before you can start using Python 3 on macOS. Ideally, fix the installer for macOS – include pyenv or something equivalent.
Describe alternatives you’ve considered Stop recommending Python to new developers.
Additional context I’m a developer myself and would’ve known to look for a version management tool, something I’m familiar with from Ruby and Node. We developers take knowledge like that for granted, but everyone’s not like us. It’s easy to forget that we’re the weird ones, living in a bubble. It should be easy for others to join that bubble, not a struggle.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top GitHub Comments
Thanks for the report. I think the main issue here is the continuing confusion between Python 2 and Python 3 command names and scripts, something not unique to macOS installations of Python. The confusion here could have been avoided by better documentation of the differences between using the command nanes
python
,python2
, andpython3
and similarlypip
,pip2
, andpip3
. Yes, use of virtual environments is one way to avoid the differences, in that an active Python 3 virtual environment provides apython
andpip
alias to the Python 3 versions. But use of a virtual environment isn’t necessary in situations like this; all that is required is ensuring that you are using the instance of pip that is associated with the instance of Python in use. If one is invoking python withpython3
then usually there will be a correspondingpip3
(likewise, for example,python3.8
andpip3.8
):pip3 install pillow
But, even better, you can avoid any ambiguity by invoking pip via the python command line:
python3 -m pip install pillow
Unfortunately, our documentation in this area lags somewhat. With the retirement of Python 2, there are some on-going efforts to improve the docs but there is still much to be done.
This isn’t going to help anyone except to provide a bit of comic relief… apparently getting it working on Mac is a challenege everywhere: https://xkcd.com/1987/