How to install Numpy on Windows 8, in pyvenv?

I have a virtual environment installed (Pyvenv, Python 3.4), but after executing the activate.bat command and the command, pip install numpyI get the error message "Cannot find vcvarsall.bat".

I added C:\Program Files (x86)\Microsoft Visual Studio 12.0\VCto the PATH variable that contains the vcvarsall.bat file, but the error still remains. What is the problem?

+4
source share
2 answers

You do not need to compile numpy on Windows, you can just download the binaries. The numpy command does not load Windows binaries in pypi (an open github problem on this topic can be found here ), and you will need to download them manually from an alternative site. It is pretty simple:

  • activate is your env and check if you have 32- or 64-bit Python:

    (myenv) c:\mypoject\> python -c "import platform; print(platform.architecture()[0])"
    

    It should print 32bitor 64bit.

  • Download the correct numpy from here and save it somewhere (i.e. c:\downloads).

    For 64bitdownload versions win-amd-64, and for 32bituse versions win32.

    , python 2.7 numpy-1.10.2+mkl-cp27-none-win32.whl. , ! .whl , !

  • env , pip ( whl), numpy:

    (myenv) c:\mypoject\> pip install c:\downloads\numpy-1.10.2+mkl-cp27-none-win32.whl
    

!

: , pip + .whl easy_install + .exe.

+7

Python3.4, :

  • "numpy-1.9.2 + mkl-cp34-none-win_amd64.whl"
  • C:\Python34\Scripts
  • cmd.exe install install "numpy-1.9.2 + mkl-cp34-none-win_amd64.whl"

:

  • cp34 → cpython3.4

  • win → windows

  • amd64 → 64-
+5

Source: https://habr.com/ru/post/1542991/


All Articles