2016-02-09 201 views
0

我嘗試在SLURM環境中使用pip安裝SciPy。 NumPy和其他一些python模塊已經安裝並正常工作。SciPy無法通過pip安裝

然而,當我運行:

pip2.7 install --user --use-wheel scipy

pip2.7 install --user scipy

我總是得到文字的一堵巨大結尾:

error: Command "/sw/compiler/gcc-4.9.3/bin/gfortran -Wall -g -shared -Wall -g -shared -shared build/temp.linux-x86_64-2.7/scipy/integrate/_odepackmodule.o -L/sw/env/gcc-4.9.3_openmpi-1.8.8/pkgsrc/2015Q4/lib -L/sw/env/gcc-4.9.3_openmpi-1.8.8/pkgsrc/2015Q4/lib -Lbuild/temp.linux-x86_64-2.7 -lodepack -lmach -llapack -lblas -lpython2.7 -lgfortran -o build/lib.linux-x86_64-2.7/scipy/integrate/_odepack.so" failed with exit status 1


Command "/sw/env/gcc-4.9.3_openmpi-1.8.8/pkgsrc/2015Q4/bin/python2.7 -c "import setuptools, tokenize;file='/work/tmp/node001.admin.2016-02-09-015538.intx033.31602/pip-build-fORQns/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /work/tmp/node001.admin.2016-02-09-015538.intx033.31602/pip-7oTcK5-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /work/tmp/node001.admin.2016-02-09-015538.intx033.31602/pip-build-fORQns/scipy

不幸的是我不知道是什麼這應該告訴我......任何想法?

+1

當SciPy的安裝失敗,但其他包做,它通常與gfortran,LAPACK,BLAS還是有些不對勁。不熟悉Slurm,但我建議確保這些設置正確,如果沒有其他人有任何更具體的建議給你。 –

+0

好的,謝謝。你有任何鏈接/文檔具體哪些包gfortran,LAPACK和BLAS需要?哪些版本? – daniel451

+1

我不認爲它太挑剔。這裏的文檔開始提供了一些指導,並且大部分流程都有詳細信息:http://www.scipy.org/scipylib/building/linux.html –

回答

1

您需要有C,C++和Fortran編譯器以及BLAS/LAPACK庫來編譯scipy。最簡單的選擇可能是gcc + gfortran +預編譯的地圖集,它應該可以工作。對於性能,尤其是線性代數,您可能需要考慮使用英特爾MKL或OpenBLAS。