Python2.7 Error: command not found: django-admin.py [How to Solve]

Tian upgraded Python under Linux, and installed Django, according to the online thinking

Under linux command line

one

two

three

python

?After entering the python command line, import Django

improt django

Then execute
again

one django-admin.py startproject mysite

Prompt command not found: the problem with django-admin.py is that the path of django-admin.py is not added to the environment variable

Just find the path to django-admin.py. I refer to the official document:

https://code.djangoproject.com/wiki/InstallationPitfalls

But that document was two years ago, only 2.4 and 2.6, and my Python version is 2.7. I tried. It’s totally wrong

But the idea is clear, that is to add soft link operation

The Linux command is almost forgotten. I can’t find it with find/- name django-admin.py. I don’t know if the command is wrong

Finally, open the folder to find django-admin.py in python27/bin /

That’s it! As shown in the figure below

 

Similar Posts: