我正在运行Windows 10,Python 3.4并且刚刚安装了Cygwin。我使用virtualenv
安装了virtualenvwrapper
和pip
。我更新了〜/ .bashrc以获得以下内容:
export WORKON_HOME=~/.virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV=c:/python35/scripts/virtualenv
source c:/python35/scripts/virtualenvwrapper.sh
但不幸的是,我在打开Cygwin的时候一直收到错误消息。出现以下错误:
path = C:\Cygwin64\tmp/virtualenvwrapper-initialize-hook-XXXXXXXXXX
lpPathBuffer = C:\Cygwin64\tmp\
szTempName = C:\Cygwin64\tmp\tmp66C6.tmp
path = C:\Cygwin64\tmp\tmp66C6.tmp
fd = 3
virtualenvwrapper.user_scripts creating C:\home\ccordero\.virtualenvs\initialize
virtualenvwrapper.user_scripts creating C:\home\ccordero\.virtualenvs\premkproject
Traceback (most recent call last):
File "C:\Python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python35\lib\site-packages\virtualenvwrapper\hook_loader.py", line 223, in <module>
main()
File "C:\Python35\lib\site-packages\virtualenvwrapper\hook_loader.py", line 138, in main
output = open(options.script_filename, "w")
OSError: [Errno 22] Invalid argument: 'C:\\Cygwin64\\tmp/virtualenvwrapper-initialize-hook-XXXXXXXXXX\r'
virtualenvwrapper.sh: There was a problem running the initialization hooks.
请帮忙!