How to integrate Django and Cygwin?

后端 未结 9 1291
野趣味
野趣味 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:25

    I just ran into the exact same problem. I've found that if you already have the windows version of python installed, it seems to get priority over the cygwin version. I solved the problem by editing /etc/profile and changed:

    PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH
    

    ...to:

    PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:
    

    ...which I think stops cygwin from adding the normal windows path. Once you've got that working, download django into some directory, move into that directory and type:

    python setup.py install
    

    I was having problems to begin with because I had omitted the 'python' bit at the start

提交回复
热议问题