numpy的安裝

並沒有安裝成功。

環境:win7-64, vs2013, python27, numpy-1.9.2, mingw-64

首先關於setup.py的各個命令的選項:


關於編譯器的選項:


1. 首先根據[7],採用編譯器mingw32

python setup.py config --compiler=mingw32 build --compiler=mingw32 bdist_wininst

出現下面的錯誤:



挺奇怪的,這個Python27\libs文件夾中沒有這個libmsvc90.a文件,在mingw的lib文件夾有,但它從C:\windows\文件夾尋找。不知道怎麼設置路徑指向mingw的文件夾。但是將mingw的libmsvcr90.a文件直接拷貝到Python27\libs文件中,會產生下面的錯誤:



不知道這個怎麼還跟MS的compiler扯上關係。

2. 選擇編譯爲msvc

python setup.py config --compiler=msvc build --compiler=msvc bdist_wininst
然後產生錯誤Unable to find vcvarsall.bat


根據[9]和自己安裝的VS2013,,設置:

SET VS90COMNTOOLS=%VS120COMNTOOLS%
然後產生connot link a simple C program的錯誤:



探索就先到這裏,等有機會的話,再進行安裝。



參考:

【1】Installing numpy - the system cannot find the file specified (msvcr90.dll) http://stackoverflow.com/questions/25072357/installing-numpy-the-system-cannot-find-the-file-specified-msvcr90-dll

【2】Windows 下安裝Python包(Numpy)的錯誤:Unable to find vcvarsall.bat http://www.cnblogs.com/exlsunshine/p/4593026.html

【3】1.4 動手實踐:在Windows上安裝NumPy、Matplotlib、SciPy和IPython http://book.51cto.com/art/201401/426520.htm

【4】[Python]Windows7 x64安裝numpy和scipy  http://delbert.me/archives/740.html

【5】【Python筆記】如何源碼編譯依賴LAPACK和ATLAS庫的NumPy包 http://blog.csdn.net/slvher/article/details/44853721

【6】如何在cmd命令行中查看、修改、刪除與添加環境變量 http://blog.csdn.net/wzsbll/article/details/6690895

【7】Building From Source on Windows  http://www.scipy.org/scipylib/building/windows.html

【8】Building 64-bit Python extensions with f2py on Windows http://stackoverflow.com/questions/16929544/building-64-bit-python-extensions-with-f2py-on-windows

【9】error: Unable to find vcvarsall.bat http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章