I use python27 but want to port a script to python3. To test it on same machine, I installed Python 3.5.1(64 bit). During setup I didn't add it to PATH(because I want Python27 to be default for programs like appengine). Still, checked the 'for all users' option. I also changed the installation dir to 'C:\Python35' (default was C:\Python35\Program Files). After install I tested it with windows python launcher by typing (in cmd prompt ):
py -3
and it worked fine. Then tried to create a python3 virtualenv (I am using virtualenvwrapper-win):
mkvirtualenv --python=C:\Python35\python.exe py35env
but it fails and I get a dialog box saying:
**python.exe - System Error**
The program can't start because VCRUNTIME140.dll is missing from your computer.
Try reinstalling program to fix this problem.
and the command prompt logs:
Running virtualenv with interpreter C:\Python35\python.exe
Using base prefix 'C:\\Python35'
New python executable in C:\Users\Abhimanyu\Envs\py35env\Scripts\python.exe
ERROR: The executable C:\Users\Abhimanyu\Envs\py35env\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is 'c:\\users\\abhimanyu\\envs' (should be 'c:\\users\\abhimanyu\\envs\\py35env')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python instal
led. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.
The normal virtualenv cmd fails with same errors as well:
virtualenv -p C:\Python35\python.exe py35env
virtualenv is installed on Python2.7.11 - 64bit (Python3.5 was installed after Python2.7). Versions of packages on python27 are:
pip (8.0.2)
setuptools (18.2)
virtualenv (14.0.6)
virtualenvwrapper-win (1.2.1)
My PATH variables are:
**System**
C:\Python27\;C:\Python27\Scripts;C:\Program Files\Broadcom\Broadcom 802.11;;;c:\program files\graphicsmagick-1.3.23-q16;C:\Program Files\ImageMagick-6.9.3-Q16;;;;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs\;C:\Program Files\Common Files\Autodesk Shared\
**User**
C:\Program Files (x86)\Google\google_appengine\;C:\Users\Abhimanyu\AppData\Roaming\npm
The default folder for virtualenvwrapper is:
C:\Users\Abhimanyu\Envs
I am on Windows7 64bit system.
Can someone please explain what might be wrong or which dlls, as logged in cmd prompt, are supposed to copied in which dir?
py -3.5 -m venv env35. Then activate it for the current command prompt viaenv35\Scripts\activate.bat. - Eryk Sun