davidmarble / virtualenvwrapper-win

Port of Doug Hellmann's virtualenvwrapper to Windows batch scripts
Other
461 stars 106 forks source link

The system cannot find the path specified #38

Closed charlesroper closed 9 years ago

charlesroper commented 11 years ago

Just installed virtualenvwrapper-win on Win8 Pro x64. Here's what I'm seeing

C:\>mkvirtualenv foo                                                   
PYTHONHOME is set.  You *must* activate the virtualenv before using it 
New python executable in foo\Scripts\python.exe                        
Installing setuptools................done.                             
Installing pip...................done.                                 
The system cannot find the path specified.

C:\>workon foo                             
The system cannot find the path specified.                         

I'm using ActiveState Python 2.7.2. Here's what's installed:

C:\>pip freeze               
Jinja2==2.7.1                
MarkupSafe==0.18             
Pygments==1.5                
Sphinx==1.2b1                
distribute==0.7.3            
docutils==0.11               
ipython==0.13                
pypm==1.3.4                  
pyreadline==2.0-dev1         
pythonselect==1.3   
pywin32==214                 
virtualenv==1.8.2            
virtualenvwrapper-win==1.0.9 
wsgiref==0.1.2               

WORKON_HOME is set:

C:\>set WORKON_HOME              
WORKON_HOME=%USERPROFILE%\Envs   

Any ideas?

piotr-dobrogost commented 11 years ago

The usual suspect is the value of %USERPROFILE%. Try setting WORKON_HOME to something sane :)

davidmarble commented 11 years ago

Does %USERPROFILE% happen to have spaces in it?

charlesroper commented 11 years ago

@davidmarble No, it's like this:

C:\>echo %USERPROFILE%
C:\Users\charlesr

I can partly see what the problem was - a directory literally called %USERPROFILE% had been created under the dir I was operating from and it seems that was being used instead of the real %USERPROFILE%. Thing is, I don't know why it was created. I certainly didn't do it. I've removed it and changed WORKON_HOME to C:\PythonEnvs and it now works. Many thanks for the suggestion @piotr-dobrogost