Issues

Issue #184 wontfix

cpvirtualenv fails under msys

Ivan Yan
created an issue

I install virtualenvwrapper under msys 1.0/python 2.7.4/win7 var pip. When I duplicate an existing virtualenv environment with cpvirtualenv a problem arises.

$ cpvirtualenv pelican test
Copying pelican as test...
Traceback (most recent call last):
  File "e:\Python\Python27\Scripts\virtualenv-clone-script.py", line 8, in <modu
le>
    load_entry_point('virtualenv-clone==0.2.4', 'console_scripts', 'virtualenv-c
lone')()
  File "E:\Python\Python27\lib\site-packages\clonevirtualenv.py", line 259, in m
ain
    clone_virtualenv(old_dir, new_dir)
  File "E:\Python\Python27\lib\site-packages\clonevirtualenv.py", line 70, in cl
one_virtualenv
    version, sys_path = _virtualenv_sys(dst_dir)
  File "E:\Python\Python27\lib\site-packages\clonevirtualenv.py", line 55, in _v
irtualenv_sys
    stdout=subprocess.PIPE)
  File "E:\Python\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "E:\Python\Python27\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
WindowsError: [Error 3] The system cannot find the path specified
stevedore.extension error calling 'user_scripts': [Errno 2] No such file or dire
ctory: 'e:\\Python\\.virtualenvs\\test\\Scripts\\predeactivate'
stevedore.extension [Errno 2] No such file or directory: 'e:\\Python\\.virtualen
vs\\test\\Scripts\\predeactivate'
Traceback (most recent call last):
  File "e:\Python\Python27\lib\site-packages\stevedore\extension.py", line 126,
in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "e:\Python\Python27\lib\site-packages\virtualenvwrapper\hook_loader.py",
line 185, in invoke
    ext.plugin(args)
  File "e:\Python\Python27\lib\site-packages\virtualenvwrapper\user_scripts.py",
 line 162, in pre_mkvirtualenv
    comment)
  File "e:\Python\Python27\lib\site-packages\virtualenvwrapper\user_scripts.py",
 line 124, in make_hook
    f = open(filename, 'w')
IOError: [Errno 2] No such file or directory: 'e:\\Python\\.virtualenvs\\test\\S
cripts\\predeactivate'

I find that virtualenvwrapper copys the virtualenv environment into 'e:\e\Python.virtualenvs\test'. If I run again cpvirtualenv, the result:

$ cpvirtualenv pelican test
Copying pelican as test...
Usage: virtualenv-clone-script.py /path/to/existing/venv /path/to/cloned/venv

virtualenv-clone-script.py: error: dest dir 'e:\\e\\Python\\.virtualenvs\\test'
exists
stevedore.extension error calling 'user_scripts': [Errno 2] No such file or dire
ctory: 'e:\\Python\\.virtualenvs\\test\\Scripts\\predeactivate'
stevedore.extension [Errno 2] No such file or directory: 'e:\\Python\\.virtualen
vs\\test\\Scripts\\predeactivate'
Traceback (most recent call last):
  File "e:\Python\Python27\lib\site-packages\stevedore\extension.py", line 126,
in _invoke_one_plugin
    response_callback(func(e, *args, **kwds))
  File "e:\Python\Python27\lib\site-packages\virtualenvwrapper\hook_loader.py",
line 185, in invoke
    ext.plugin(args)
  File "e:\Python\Python27\lib\site-packages\virtualenvwrapper\user_scripts.py",
 line 162, in pre_mkvirtualenv
    comment)
  File "e:\Python\Python27\lib\site-packages\virtualenvwrapper\user_scripts.py",
 line 124, in make_hook
    f = open(filename, 'w')
IOError: [Errno 2] No such file or directory: 'e:\\Python\\.virtualenvs\\test\\S
cripts\\predeactivate'

Here it's clearly that the path of dest dir is wrong.I try a test, $trg in function cpvirtualenv is '\e\Python.virtualenvs\test', It seams that virtualenv-clone.exe does not consider this specail situation.

Comments (3)

  1. Doug Hellmann repo owner

    I don't have any way to test with MSYS, so I don't think this is something I can fix. If someone wants to propose a patch to fix it, I could try evaluating it, but I can't fix it myself.

  2. Log in to comment