How to integrate Django and Cygwin?

后端 未结 9 1265
野趣味
野趣味 2021-02-14 11:35

I have a Windows box with cygwin, python and django installed.

Now I want to run django-admin, but when I do I get the error:

$ django-admin.py
c:\\Pytho         


        
相关标签:
9条回答
  • 2021-02-14 12:36

    Add the location of your django/bin folder (or wherever else you keep django-admin.py) to your PYTHONPATH environment variable.

    0 讨论(0)
  • 2021-02-14 12:40

    From here

    For Windows users, who do not have symlinking functionality available, you can copy django-admin.py to a location on your existing path or edit the PATH settings (under Settings - Control Panel - System - Advanced - Environment...) to point to its installed location.

    hope this helps

    0 讨论(0)
  • 2021-02-14 12:40

    Add two lines to .bash_profile and .bashrc files (view their difference here). You can find them in C:\cygwin\home\[username]:

    export PATH=$PATH:/cygdrive/c/python2.7
    export PYTHONPATH=$PYTHONPATH:/cygdrive/c/python2.7/Lib/site-packages
    

    Hope this helps

    0 讨论(0)
提交回复
热议问题