通过Cygwin运行Python脚本时出现问题

问题描述:

我正在尝试通过Windows的Cygwin运行我的Python脚本.运行Python时出现以下错误.问题是当通过Cygwin运行Python时,它随后通过Windows的Python实例运行命令,即 C:\ Python32 \ python.exe ,然后找不到 py 我使用Cygwin方式链接到的文件.

I'm trying to run my Python scripts via Cygwin from Windows. I'm getting the following error when running Python. The problem is when running Python via Cygwin it then runs the command via the Windows instance of Python i.e. C:\Python32\python.exe which then can't find the py file I'm linking to using the Cygwin way.

$ /cygdrive/c/Python32/python /cygdrive/c/elf/GIT/src/sfgenctl.py
C:\Python32\python.exe: can't open file '/cygdrive/c/elf/GIT/src/sfgenctl.py':
[Errno 2] No such file or directory

有没有办法解决这个问题?

Is there a way around this?

谢谢

简单的方法是安装Python Cygwin插件.谢谢大家.

Simple way of doing this was to install the Python Cygwin add on. Thanks for the helo guys.