virtualenvwrapper使用python3.4在cygwin上发布问题(使用独立安装程序安装)

时间:2014-04-05 15:59:13

标签: python virtualenvwrapper

我遇到了virtualenv包装器的问题,运行时收到以下错误: 来源/cygdrive/c/Python34/Scripts/virtualenvwrapper.sh

我已经

  • 哪个python< - 显示正确的路径
  • virtualenvwrapper.sh< - 显示正确的路径
  • 哪个virtualenv< - 显示正确的路径

错误:

>$ source /cygdrive/c/Python34/Scripts/virtualenvwrapper.sh
stevedore.extension error calling 'project': [Errno 2] No such file or directory                                          : 'C:\\home\\kolafsson\\.virtualenvs\\premkproject'
stevedore.extension [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.                                          virtualenvs\\premkproject'
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\stevedore-0.15-py3.4.egg\stevedore\extensi                                          on.py", line 248, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\hook_loader.py", line 185, in invoke
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\project.py", line 30, in initialize
    comment)
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\user_scripts.py", line 124, in make_hook
    f = open(filename, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.v                                          irtualenvs\\premkproject'
stevedore.extension error calling 'user_scripts': [Errno 2] No such file or dire                                          ctory: 'C:\\home\\kolafsson\\.virtualenvs\\initialize'
stevedore.extension [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.                                          virtualenvs\\initialize'
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\stevedore-0.15-py3.4.egg\stevedore\extensi                                          on.py", line 248, in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\hook_loader.py", line 185, in invoke
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\user_scripts.py", line 141, in initialize
    make_hook(get_path('$VIRTUALENVWRAPPER_HOOK_DIR', filename), comment)
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\user_scripts.py", line 124, in make_hook
    f = open(filename, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.v                                          irtualenvs\\initialize'
Traceback (most recent call last):
  File "C:\Python34\lib\runpy.py", line 171, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python34\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\hook_loader.py", line 217, in <module>
  File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv                                          wrapper\hook_loader.py", line 137, in main
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/virtualenvwrapper-                                          initialize-hook-Kxjb02CrwN'
virtualenvwrapper.sh: There was a problem running the initialization hooks.

如果Python无法导入模块virtualenvwrapper.hook_loader, 检查是否已安装virtualenv VIRTUALENVWRAPPER_PYTHON = / cygdrive / c / Python34 / python和PATH是 设置得当。

有谁知道导致此错误的原因以及我如何修复它?

1 个答案:

答案 0 :(得分:0)

我遇到的问题是由于virtualenv目录的权限不正确。当我需要本地用户时,它有了root权限。

这里可能是'C:\\home\\kolafsson\\.v....