2
我試圖在Ubuntu 14.04.4 LTS上安裝scipy軟件包,只是因爲gensim需要它,使用pip(在任何人在切換到其他十二個python包管理者:否)。我已經安裝了所有前提條件軟件包:用於scipy的PIP安裝在Ubuntu上出現失敗14.04
- 蟒蛇2.7
- libblas3
- liblapack3
- GCC
- gfortran
- 中的python-dev的
- libc6的
- libatlas基
- libatlas-dev
- 蟒蛇,建立必要的
當我運行PIP安裝gensim,我得到的編譯器警告,隨後幾個virtual memory exhausted: Cannot allocate memory
誤差約近十分鐘。一個編譯器警告,不斷上來的是:
/home/ubuntu/www/cool-project/venv/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
儘管這是安裝numpy的已經有:
(venv)[email protected]:~/www/cool-project$ pip install numpy --upgrade
Requirement already up-to-date: numpy in ./venv/lib/python2.7/site-packages
Cleaning up...
最後,最後的錯誤消息:
error: Command "c++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -D__STDC_FORMAT_MACROS=1 -Iscipy/sparse/sparsetools -I/home/ubuntu/www/cool-project/venv/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c scipy/sparse/sparsetools/bsr.cxx -o build/temp.linux-x86_64-2.7/scipy/sparse/sparsetools/bsr.o" failed with exit status 1
任何想法,爲什麼這是怎麼回事?
FWIW,我在Ubuntu 16.04的virtualenv中安裝了'pip install gensim',沒有任何問題。 – edwinksl
'sudo apt-get install python-scipy'默認路徑,編譯器,編譯器版本,輸出樣式? – dsgdfg
Scipy不僅僅是Python代碼。它有太多的Fortran和C代碼要編譯。因此需要特別小心。你有沒有嘗試https://scipy.org/install.html#ubuntu-debian?當你在切換到Python 3也許? – percusse