Command not found: django-admin.py

前端 未结 27 1927
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 02:40

I am a complete beginner to Python/Django, but I want to dive right in and start experimenting. Thus I was following this guide on installing Python/Django http://devcenter.

27条回答
  •  死守一世寂寞
    2020-12-03 03:32

    Get site-package path with Python:

    import site; site.getsitepackages()
    

    And run django-admin.py directly:

    python (your-site-package-addresss)/django/bin/django-admin.py startproject hellodjango
    



    On Mac: If this works you can go and add django-admin.py to your path using symlink:

    sudo ln -s (your-site-package-addresss)/django/bin/django-admin.py /usr/local/bin/django-admin
    

    (could be that you have to reopen terminal or reinstall django to get the symlink working)

提交回复
热议问题