Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
217 views
in Technique[技术] by (71.8m points)

python - Installing NumPy and SciPy on 64-bit Windows (with Pip)

I found out that it's impossible to install NumPy/SciPy via installers on Windows 64-bit, that's only possible on 32-bit. Because I need more memory than a 32-bit installation gives me, I need the 64-bit version of everything.

I tried to install everything via Pip and most things worked. But when I came to SciPy, it complained about missing a Fortran compiler. So I installed Fortran via MinGW/MSYS. But you can't install SciPy right away after that, you need to reinstall NumPy. So I tried that, but now it doesn't work anymore via Pip nor via easy_install. Both give these errors:

  • There are a lot of errors about LNK2019 and LNK1120,.
  • I get a lot of errors in the range of C: C2065,C2054,C2085,C2143`, etc. They belong together I believe.
  • There is no Fortran linker found, but I have no idea how to install that, can't find anything on it.
  • And many more errors which are already out of the visible part of my cmd-windows...
  • The fatal error is about LNK1120:

    buildlib.win-amd64-2.7 umpylinalglapack_lite.pyd : fatal error LNK1120: 7 unresolved externals error: Setup script exited with error: Command "C:UsersmeAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCBinamd64link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:BLAS /LIBPATH:C:Python27libs /LIBPATH:C:Python27PCbuildamd64 /LIBPATH:buildemp.win-amd64-2.7 lapack.lib blas.lib /EXPORT:initlapack_lite buildemp.win-amd64-2.7Release umpylinalglapack_litemodule.obj /OUT:buildlib.win-amd64-2.7 umpylinalglapack_lite.pyd /IMPLIB:buildemp.win-amd64-2.7Release umpylinalglapack_lite.lib /MANIFESTFILE:buildemp.win-amd64-2.7Release umpylinalglapack_lite.pyd.manifest" failed with exit status 1120

What is the correct way to install the 64-bit versions NumPy and SciPy on a 64-bit Windows machine? Did I miss anything? Do I need to specify something somewhere? There is no information for Windows on these problems that I can find, only for Linux or Mac OS X, but they don't help me as I can't use their commands.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can install scipy and numpy using their wheels.

First install wheel package if it's already not there...

pip install wheel

Just select the package you want from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

Example: if you're running python3.5 32 bit on Windows choose scipy-0.18.1-cp35-cp35m-win_amd64.whl then it will automatically download.

Then go to the command line and change the directory to the downloads folder and install the above wheel using pip.

Example:

cd C:Users[user]Downloads
pip install scipy-0.18.1-cp35-cp35m-win_amd64.whl

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...