No matter what I do, django-admin.py is not found, although this is in my way

I added C: \ Python26 \ Lib \ site-packages \ django \ bin to my path, I started a new cmd session on Windows 7, but when I try to execute 'python django-admin.py ...' it says no file django-admin.py. When I type the path, there is a full path to ... \ django \ bin. It drives me crazy. It is clear there, but it does not work. Any suggestions?

+3
source share
5 answers

The python interpreter doesn't look everywhere in your path to find the script. It looks everywhere for imports, but not for scripts.

django-admin.py, django-admin.py, python django-admin.py, . Windows , python script.

OK

Windows Python (.. python ), : python -m django-admin , , python -m django-admin.py. -m , .

+5

, , . Windows :

C:\python27 \; C:\\ python27

, python 2.7.3 django 1.4.3

+5

python -mdjango-admin , . -m Python sys.path " script" - , , !

+4

python syspath django:

python -m django.bin.django-admin
+3
source

I had the same problem and python -mdjango-admin is working. but I had to define PYTHONHOME and PYTHONPATH first

0
source

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


All Articles