1

Resolved

First attempt at creating virtual env fails

description

VS 2013, PTVS 2.1 Beta. On a fresh new VM with Python 2.7 and 3.4.

The first time I tried to create a virtual environment using PTVS, based on Python 2.7, I got:
Virtual environment is being created at 'C:\Users\huvalo\Documents\Visual Studio 2013\Projects\tutorial\env'
Virtual environment was not created at 'C:\Users\huvalo\Documents\Visual Studio 2013\Projects\tutorial\env'. Exit code: 1
C:\Python27\python.exe: No module named venv
Second attempt at creating a virtual env works:
Downloading/unpacking https://go.microsoft.com/fwlink/?LinkID=317969
  Cannot determine compression type for file c:\users\huvalo\appdata\local\temp\pip-fzvy7n-unpack\fwlink.obj
  Running setup.py (path:c:\users\huvalo\appdata\local\temp\pip-xlsao9-build\setup.py) egg_info for package from https://go.microsoft.com/fwlink/?LinkID=317969
    
    warning: no previously-included files matching '*' found under directory 'docs\_templates'
    warning: no previously-included files matching '*' found under directory 'docs\_build'
Installing collected packages: virtualenv
  Running setup.py install for virtualenv
    
    warning: no previously-included files matching '*' found under directory 'docs\_templates'
    warning: no previously-included files matching '*' found under directory 'docs\_build'
    Installing virtualenv-script.py script to C:\Python27\Scripts
    Installing virtualenv.exe script to C:\Python27\Scripts
    Installing virtualenv.exe.manifest script to C:\Python27\Scripts
    Installing virtualenv-2.7-script.py script to C:\Python27\Scripts
    Installing virtualenv-2.7.exe script to C:\Python27\Scripts
    Installing virtualenv-2.7.exe.manifest script to C:\Python27\Scripts
Successfully installed virtualenv
Cleaning up...
Virtual environment is being created at 'C:\Users\huvalo\Documents\Visual Studio 2013\Projects\tutorial\env'
New python executable in env\Scripts\python.exe
Installing setuptools, pip...done.
Virtual environment was successfully created at 'C:\Users\huvalo\Documents\Visual Studio 2013\Projects\tutorial\env'
This is 2 machines today that did this. The first I attributed to possible user error, but now I'm thinking there's a real issue.

comments

Zooba wrote May 22 at 9:54 PM

I think this is a race condition between the logic that detects whether we have venv or virtualenv and the UI.