4

I'm trying to install Numpy and other packages into a virtualenv.

When I try to install it, I get an error, "cannot find vcvarsall.bat". On my main (system wide) Python, I solved this by installing the Microsoft Visual Studio download, but that does not work inside a virtualenv - the Windows installer wants to install it against my default Python, not the one in the virtual environment.

So how do I get around this error? It's not just for Numpy, but lots of packages want this. Things that don't work:

  • Installing the exe file from here using setuptools.
  • Running the install from a cmd window inside the virtualenv.
  • Installing from inside PyCharm (same error, it seems to be just calling pip).

How do I install into a virtualenv on Windows? [Win 7, Python 2.7.3]

Dirk
  • 3,073
  • 4
  • 31
  • 36
  • Your windows architecture (32 or 64bit)? And pythons' arch? – alko Dec 10 '13 at 19:31
  • All installs are 32bit, including Python. System is 64 bit. – Dirk Dec 10 '13 at 19:38
  • what do you mean with "install against my default Python"? Python setup.py calls compiler, not vise versa. So you need only ensure that msvc is properly configured, i.e. VS90COMNTOOLS is properly set. Or am I missing something? – alko Dec 10 '13 at 20:19
  • @alko: You may be on to something. Where do I set VS90COMNTOOLS? – Dirk Dec 10 '13 at 21:04
  • 1
    refer to http://stackoverflow.com/a/8705722/1265154 – alko Dec 10 '13 at 21:07
  • Thanks. Those registry keys are not present in my system, so I will add them. – Dirk Dec 10 '13 at 21:34
  • This fixed the vcvarsall.bat problem. Thanks! Numpy still does not install: "Broken toolchain: cannot link a simple C program", but it's progress. – Dirk Dec 11 '13 at 15:26

0 Answers0