Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Avoid ambiguity by explicitly invoking python3 #4459

Merged
merged 1 commit into from
Mar 9, 2020

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Mar 1, 2020

python/pythondotorg#1549 details someone's difficulty pip installing Pillow.

Whilst it's more a general Python issue than a Pillow issue, one reply is (python/pythondotorg#1549 (comment)):

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 nanespython, python2, and python3 and similarly pip, pip2, and pip3. Yes, use of virtual environments is one way to avoid the differences, in that an active Python 3 virtual environment provides a python and pip 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 with python3 then usually there will be a corresponding pip3 (likewise, for example, python3.8 and pip3.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.


We recently updated the docs to recommend using python -m pip over pip (#4214).

Let's also recommend using python3 -m pip over python -m pip.

@python-pillow python-pillow deleted a comment from codecov bot Mar 1, 2020
@radarhere radarhere merged commit 846662e into python-pillow:master Mar 9, 2020
@hugovk hugovk deleted the python3-m-pip-install branch March 9, 2020 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants