Why do python and py commands run different versions of python 3?

I installed djangousing the command pip( pip install Django), but I can not start it using the command py, because it can not find the module. I can only make it work with the python command.

Here is a brief overview of the screenshot I clicked

$ python --version
Python 3.6.1
$ py --version
Python 3.6.0

It also looks like django only works with 3.6.1.

Is there a way to install both commands to run the latest python version?

Screenshot:

screen

+4
source share
2 answers

py - , C:\Windows. , , , Linux, Windows , python py, , , . , , (python.bak ..) , Windows, , , , . , , . , , , , , , , - pip:

py -m pip install packagename
python -m pip install packagename

python Windows, . Django Windows.

+1

Python launcher Windows py. , Python py :

> py -3.6

PEP 397: Python

, PY_PYTHON - "2". , (, "2" ) major.minor (, "2.6" ) major.minor-32.

, PY_PYTHON{major} ( {major} - ), . , Python , , , , , .

.INI, . INI [ ], , PY_ prefix ( , INI .) , INI .

Plus Python Python, shebang #! , , * nix Windows.

* Python Launcher for Windows.

+2

Source: https://habr.com/ru/post/1684992/


All Articles