django-admin.py creating a project failure workaround

Source: Internet
Author: User

Environment: Ubuntu, python2.7, django1.9.5

When you create a corresponding Django project with django-admin.py Startproject ProjectName, a solution with command not found:django-admin.py occurs:

  • Locate the path of the corresponding file django-admin.py:

To run the related command:

  • Then switch to the corresponding directory: Cd/home/zhanglei/.local/lib/python2.7/site-packages/django/bin (the path you see in the first step)

You can see that the django-admin.py file exists under the corresponding directory

  • Then establish a soft connection: sudo ln-s/home/zhanglei/.local/lib/python2.7/site-packages/django/bin/django-admin.py/usr/local/bin/ django-admin.py
  • Switch to the directory where you want to create the project, run the command: django-admin.py startproject Testdjango to see that the Testdjango project was created successfully.

django-admin.py creating a project failure workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.