Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Vim中使用Windows Python时Syntastic失败_Python_Windows_Vim_Cygwin_Vim Syntastic - Fatal编程技术网

在Vim中使用Windows Python时Syntastic失败

在Vim中使用Windows Python时Syntastic失败,python,windows,vim,cygwin,vim-syntastic,Python,Windows,Vim,Cygwin,Vim Syntastic,我在windows上使用vim,来自cygwin 我将PYthon更改为Windows PYthon,即my.bashrc包括: PATH=/cygdrive/c/Python27:$PATH 这会导致syntastic插件失败,因为Windows Python不处理/cygdrive/c/前缀而不是c:/: syntastic: error: checker output: C:\Python27\python.exe: can't open file '/cygdrive/c/[pat

我在windows上使用vim,来自cygwin

我将PYthon更改为Windows PYthon,即my.bashrc包括:

  PATH=/cygdrive/c/Python27:$PATH
这会导致syntastic插件失败,因为Windows Python不处理/cygdrive/c/前缀而不是c:/:

syntastic: error: checker output:
C:\Python27\python.exe: can't open file '/cygdrive/c/[path to my .vim folder]/.vim/bundle/syntastic/syntax_checkers/python/compile.py': [Errno 2] No such file or directory
据我所知,解决方案是在cygwin终端调用Windows Python时以/cygwin/c/开头更改文件路径


如何做到这一点?

为什么首先需要Windows Python?如果需要类似Ux的接口,可以安装Cygwin。Cygwin自带了自己的Python(27)。您的第一个问题是不正确地使用了
shellslash
(参见
:h syntastic shellslash
)。可能还有其他的。为什么首先需要Windows Python?如果需要类似Ux的接口,可以安装Cygwin。Cygwin自带了自己的Python(27)。您的第一个问题是不正确地使用了
shellslash
(参见
:h syntastic shellslash
)。可能还有其他的。