-2

My system is :win7 64 ultimate +python34(64)+intel 64 chip.
I have installed mingw64 ,please see:

C:\Users\pengsir>d:\mingw\bin\gcc -v
Reading specs from d:/mingw/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.2/specs
COLLECT_GCC=d:\mingw\bin\gcc
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.2/lto-wra
pper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-4.8.2/configure --prefix=/opt/windows_64 --with-sysroot=
/opt/windows_64 --libdir=/opt/windows_64/lib64 --mandir=/opt/windows_64/man --in
fodir=/opt/windows_64/info --enable-shared --disable-bootstrap --disable-multili
b --enable-threads=posix --enable-languages=c,c++ --enable-checking=release --wi
th-system-zlib --with-python-dir=/lib64/python2.7/site-packages --disable-libunw
ind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --e
nable-java-home --with-java-home=/opt/windows_64/lib64/jvm/jre --with-jvm-root-d
ir=/opt/windows_64/lib64/jvm --with-jvm-jar-dir=/opt/windows_64/lib64/jvm/jvm-ex
ports --with-arch-directory=amd64 --with-antlr-jar='/home/adrien/projects/win-bu
ilds-1.4/slackware64-current/d/gcc/antlr-*.jar' --disable-java-awt --disable-gtk
test --build=x86_64-slackware-linux --host=x86_64-w64-mingw32 --target=x86_64-w6
4-mingw32
Thread model: posix
gcc version 4.8.2 (GCC)

when i install with the command:

d:\Python34\Scripts\pip.exe  install numpy
(other message ommitted)


error: Unable to find vcvarsall.bat

How to compile the numpy to install on the python34?
I don't want to install vs2013 ,i like free software,no money to pay for vs2013 ,please teach me to complie numpy to install on 64 bits platform mingw64.

showkey
  • 482
  • 42
  • 140
  • 295

2 Answers2

2

Is there some requirement that you build numpy from source? I have always just installed it (and every other Python package that's troublesome on Windows) from Christoph Gohlke's Unofficial Binaries Page, which has always worked perfectly for me.

Henry Keiter
  • 16,863
  • 7
  • 51
  • 80
  • my cpu is intel 64 not amd64, how can i install amd64 for python packages? – showkey Jul 01 '14 at 15:05
  • @it_is_a_literature Your actual CPU architecture is completely irrelevant here. The "amd" in the name is just a convention, [probably due to the fact that AMD was the first company to release a (x86-) 64-bit CPU](http://unix.stackexchange.com/q/53415). The "amd64" binaries are for use with 64-bit Python, whereas "win32" binaries are for 32-bit Python. – Henry Keiter Jul 01 '14 at 15:09
1

As per http://shop.wickeddevice.com/2013/12/11/windows-7-python-virtualenv-and-the-unable-to-find-vcvarsall-bat-error/:

  1. For Python 3.4, download Visual C++ 2010 from http://www.lfd.uci.edu/~gohlke/pythonlibs/.

  2. Install it.

  3. Open Windows explorer (the file browser) and search for the location of ‘vcvarsall.bat’ and cut it to your clipboard. run regedit from the Windows start key. You will need admin privilges. Add a registry entry to HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir (64 bit Windows) or HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir (32 bit) (If these don't work, try replacing VisualStudio with VCExpress as described in How do I point easy_install to vcvarsall.bat?

  4. Restart cmd and try again.

Community
  • 1
  • 1
Hotchips
  • 621
  • 5
  • 18
  • I don't want to install vs2013 ,i like free software,no money to pay for vs2013 ,please teach me to complie numpy to install on 64 bits platform mingw64. – showkey Jul 01 '14 at 14:20
  • 2
    @it_is_a_literature Read the answer again: nowhere does it mention installing Visual Studio. You *need* the **Visual C++ distributable**, which is a library that includes vcvarsall, in order to build any Python libraries that require it. (That said, Hotchips, I think the appropriate registry key here is under `\Microsoft\VCExpress\` rather than `\VisualStudio\`). – Henry Keiter Jul 01 '14 at 14:51
  • is Microsoft Visual C++ 2010 Redistributable Package (x64) ,or Visual C++ distributable ,for the first one, ,i have download it,and install it from http://www.microsoft.com/en-us/download/confirmation.aspx?id=14632 . – showkey Jul 01 '14 at 15:08