Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualenv fails with Python 3.5 on Windows #796

Closed
mgedmin opened this issue Sep 15, 2015 · 16 comments
Closed

virtualenv fails with Python 3.5 on Windows #796

mgedmin opened this issue Sep 15, 2015 · 16 comments

Comments

@mgedmin
Copy link

mgedmin commented Sep 15, 2015

  1. Install Python 3.5 using the official Windows installer
  2. Get a shell
  3. python -m ensurepip (because the installer didn't install pip for me for some reason)
  4. python -m pip install virtualenv (gets me version 13.1.2)
  5. python -m virtualenv env

I expect: a virtualenv in ./env

I get: a GUI error dialog saying "The program can't start because VCRUNTIME140.dll is missing from your computer."

Apparently virtualenv needs to copy vcruntime140.dll into the new virtualenv for Python 3.5 to work on Windows.

Originally filed at http://bugs.python.org/issue25119

@Ivoz
Copy link

Ivoz commented Sep 20, 2015

@zooba do you have any advice on how best virtualenv should be proceeding here? Copying a dll to every 3.5 virtualenv?

@zooba
Copy link

zooba commented Sep 22, 2015

Yeah, that's going to be necessary.

On Windows, I'd suggest copying every vcruntime*.dll file from sys.prefix and join(sys.prefix, 'DLLs'). At some point we will move vcruntime140.dll into DLLs for back-compat with older extension modules, but no telling when that will be (I'm not yet convinced it will have to be in a major release).

@matthew-brett
Copy link

Do you also get this error with https://pypi.python.org/pypi/virtualenv-rewrite ?

@matthew-brett matthew-brett mentioned this issue Nov 23, 2015
5 tasks
@mgedmin
Copy link
Author

mgedmin commented Nov 24, 2015

No, virtualenv-rewrite works fine with Python 3.5. (I've tested virtualenv-rewrite 14.1.0 a while ago, it still works fine on my Jenkins.)

@carlosperate
Copy link

I'm having the same issue on Windows and copying the dll is not enough as it has not really finished setting up the scripts.

I have python 2.7 and 3.5 on the same windows (both installed for all users) and it fails with all the following commands.

> virtualenv --python="C:\Python35\python.exe" env

(with virtualenvwrapper) > mkvirtualenv --python="C:\Python35\python.exe" env

> C:\Python35\Scripts\virtualenv-3.4.exe  --python="C:\Python35\python.exe" env

@jedie
Copy link

jedie commented Jan 7, 2016

confirm this bug with Python 3.5.1 under windows 10 with virtualenv v13.1.2 :(

@carlosperate
Copy link

Btw, I had to revert to 3.4 to get it to work.

mgedmin added a commit to mgedmin/imgdiff that referenced this issue Jul 5, 2016
Works around the terrible mess that is the state of Python packaging:

- latest virtualenv doesn't work with Python 3.5 on Windows
  (pypa/virtualenv#796)

- virtualenv-rewrite that I use instead works with Python 3.5 but
  bundles an outdated version of pip

- old version of pip doesn't find the right binary wheels for Pillow
  (because the ABI tag changed) and tries to compile, which fails
mgedmin added a commit to mgedmin/mgp2pdf that referenced this issue Jul 7, 2016
Works around the terrible mess that is the state of Python packaging:

- latest virtualenv doesn't work with Python 3.5 on Windows
  (pypa/virtualenv#796)

- virtualenv-rewrite that I use instead works with Python 3.5 but
  bundles an outdated version of pip

- old version of pip doesn't find the right binary wheels for Pillow
  (because the ABI tag changed) and tries to compile, which fails
mgedmin added a commit to mgedmin/dozer that referenced this issue Aug 4, 2016
Works around the terrible mess that is the state of Python packaging:

- latest virtualenv doesn't work with Python 3.5 on Windows
  (pypa/virtualenv#796)

- virtualenv-rewrite that I use instead works with Python 3.5 but
  bundles an outdated version of pip

- old version of pip doesn't find the right binary wheels for Pillow
  (because the ABI tag changed) and tries to compile, which fails
@aivarannamaa
Copy link

I confirm this with Python 3.5.2 under Windows 10 with virtualenv 15.0.3

@eromoe
Copy link

eromoe commented Aug 26, 2016

confirm this with Python 3.5.2 under Windows 8.1 with virtualenv 15.0.3

mgedmin added a commit to mgedmin/zodbbrowser that referenced this issue Aug 26, 2016
Works around the terrible mess that is the state of Python packaging:

- latest virtualenv doesn't work with Python 3.5 on Windows
  (pypa/virtualenv#796)

- virtualenv-rewrite that I use instead works with Python 3.5 but
  bundles an outdated version of pip

- old version of pip doesn't find the right binary wheels for lxml
  (because the ABI tag changed) and tries to compile, which fails
@jmitz
Copy link

jmitz commented Sep 27, 2016

Confirm bug with Python 3.5.2 on Windows 7 with virtualenv 15.0.3

@mayank1495
Copy link

Ok guyz. I had the same problem. I installed "pywin32" from https://sourceforge.net/projects/pywin32/.
I didnt get the error after that. pywin32 has python extension for windows.
Install it for your version of python.
Make sure you get the correct version (matches Python version, 32bit/64bit, etc).
Hope it helps.

@Amytipple
Copy link

Amytipple commented Dec 16, 2016

For Windows 7 Python 3.5.2 copy http://www.opendll.com/index.php?file-download=vcruntime140.dll&arch=64Bit&version=14.0.22816.0&dsc=Microsoft%AE-C-Runtime-Library# to C:\Windows

@mgedmin
Copy link
Author

mgedmin commented Dec 29, 2016

Thank you, Amytipple! BTW no need to download DLL files from untrusted random Internet sites, just copy the one from c:/Python3.5/ (or wherever you installed Python 3.5) into any directory on your %PATH%.

@The-Compiler
Copy link

Similarily, it doesn't copy python3.dll which means some extension modules (like PyQt5) will fail with ImportError: DLL load failed: The specified module could not be found.

@schlamar
Copy link

schlamar commented May 11, 2017

There is a simple workaround. Just update the path to include the specific Python version, e.g.:

set "PATH=C:\Program Files (x86)\Python36-32;%PATH%"

@stale
Copy link

stale bot commented Jan 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 14, 2019
@stale stale bot closed this as completed Jan 21, 2019
@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests