X Tutup
The Wayback Machine - https://web.archive.org/web/20210119193810/https://github.com/realpython/python-guide/issues/846
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

Discrepancy in Installation Python 3 on Windows #846

Open
uranusjr opened this issue Oct 2, 2017 · 3 comments
Open

Discrepancy in Installation Python 3 on Windows #846

uranusjr opened this issue Oct 2, 2017 · 3 comments

Comments

@uranusjr
Copy link

@uranusjr uranusjr commented Oct 2, 2017

The Working with Python 3 section mentions you should use python3 to launch the Python 3 interpreter, which does not actually work. The Windows distribution provides only python.exe for all versions of Python, and to launch the Python 3 interpreter you need python. This also creates problems if you install both Python 2 and 3—the executables override each other, and only one of the exes is visible at a time through %Path% (what actually is visible depends on the order of the search paths).

AFAIK the official way to deal with this problem is through the py launcher, but that only solves the python.exe problem, not other scripts installed later during the setup (e.g. pip vs pip3), and other global tools (e.g. pipenv). It will affect other parts of the tutorial as well.

@kennethreitz42
Copy link
Contributor

@kennethreitz42 kennethreitz42 commented Oct 2, 2017

pull requests accepted!

@twwilliams
Copy link

@twwilliams twwilliams commented Dec 22, 2017

Since both pip and pipenv can be run as py -m pip or py -m pipenv, and py -2 runs v2 of Python, there is a way to handle simultaneously installed versions on Windows:

> py -m pip --version
pip 9.0.1 from C:\Users\twwilliams\AppData\Local\Programs\Python\Python36\lib\site-packages (python 3.6)
> py -2 -m pip --version
pip 9.0.1 from C:\Users\twwwilliams\.windows-build-tools\python27\lib\site-packages (python 2.7)

I will try to take some time over the holiday to put together a pull request to address this.

@apjanke
Copy link
Contributor

@apjanke apjanke commented Dec 18, 2018

I think this has been resolved by making Python 3 the default version in the guide and assuming python means Python 3 everywhere. Can this be closed out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.
X Tutup