#29922 closed Bug (invalid)
Windows/Linux,macOS button has opposite syntax
Reported by: | Steven Erredge | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | Linux, macOS, Windows, tutorial |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description
Ex:
Click on Windows --> returns Linux/macOS shell syntax
...\> py -m django --version
Click on Linux/macOs --> returns Windows shell syntax
$ python -m django --version
Here is the link --> https://docs.djangoproject.com/en/2.1/intro/tutorial01/
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
The commands are correct.
On macOS/Linux (with bash) you'll get:
$ py -m django --version -bash: py: command not found
Assuming you have Python on your PATH
, or an active virtual environment both commands would work on Windows, but as Tim says py
is the Python Launcher that's installed on Windows.
See: https://docs.python.org/3/using/windows.html#python-launcher-for-windows
Whilst you'll always have python
available with an active venv
, not having python
on your PATH
normally and using py
to select the desired interpreter is (I think) recommended. (The install notes say "If selected, the install directory will be added to the system PATH" but don't say "Don't do this", as perhaps they might....)
If something is missing here, please reply and we can re-open if there's a mistake. Thanks!
py
is the Python launcher which is Windows only. Does it not work on your system? I think it's installed by default.