Correct path usage in Cygwin : Difference between `python c:\somefile.py` & `python /cygdrive/c/somefile.py`

前端 未结 3 753
一个人的身影
一个人的身影 2020-12-30 09:49

I\'m using Django 1.5 & Python 2.7 on Windows + Cygwin. The following command gives me an error in bash shell

$ python /cygdrive/c/Python27/Lib/site-pac         


        
3条回答
  •  自闭症患者
    2020-12-30 10:12

    Well, nothing should be different:

    hgs15624@ESCLT0116 ~
    $ python /cygdrive/c/test.py
    Hello
    
    hgs15624@ESCLT0116 ~
    $ python c:/test.py 
    Hello
    

    I guess you've looked for odd permissions.

    Edit: the below was just referring to a typo in the question.

    The error says:

    /cygdrive/c/Python27/Lib/sitepackages/django/bin/django-admin.py
    

    Did you miss the hyphen in site-packages?

提交回复
热议问题