.py files open in a text editor when run from cmd

Whenever I try to run a .py file from cmd, it opens in a text editor (np ++). I am trying to run the following:

django-admin.py startproject testprj

Even if I ran setup.py install

+3
source share
3 answers

You need to change the file association to open .py files with the Python executable usually located in C:\Python<version>\, not Notepad ++

Changing this should be simple, but here is how to do it.

Also, read here to set the environment path to find the Python executable without having to go to C: \ Python2. 6.

+5
source

Windows .py . python.exe, python, :

python django-admin.py startproject testprj

, Vista Windows 7, " " → " " → " "

+1

: `python ( python.exe python.exe ) filename ( .) .

, setup.py : :

cd, , .py

"pathtopythonwithoutnameonend\python.exe" (In "!) setup.py 

python  "pathtofolderinwhichsetup.pyiswithoutname\setup.py" (In "!)

. .

0
source

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


All Articles