2016-05-31 127 views
0

我無法在我的Linux服務器上安裝熊貓。我正在使用virtualenv,但我嘗試安裝熊貓沒有,但沒有運氣。安裝熊貓的問題

[email protected]:~# uname -a 
    Linux host 3.13.0-61-generiC#100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux 

Numpy安裝了很多警告。

You are using pip version 6.0.8, however version 8.1.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
Collecting numpy 
    Using cached numpy-1.11.0.tar.gz 
    Running from numpy source directory. 
Installing collected packages: numpy 
    Running setup.py install for numpy 
...(truncated) 
    /tmp/pip-build-q8d07pgn/numpy/numpy/distutils/system_info.py:1652: UserWarning: 
     Blas (http://www.netlib.org/blas/) sources not found. 
     Directories to search for the sources can be specified in the 
     numpy/distutils/site.cfg file (section [blas_src]) or by setting 
     the BLAS_SRC environment variable. 
     warnings.warn(BlasSrcNotFoundError.__doc__) 
    /tmp/pip-build-q8d07pgn/numpy/numpy/distutils/system_info.py:1542: UserWarning: 
     Atlas (http://math-atlas.sourceforge.net/) libraries not found. 
     Directories to search for the libraries can be specified in the 
     numpy/distutils/site.cfg file (section [atlas]) or by setting 
     the ATLAS environment variable. 
     warnings.warn(AtlasNotFoundError.__doc__) 
    /tmp/pip-build-q8d07pgn/numpy/numpy/distutils/system_info.py:1553: UserWarning: 
     Lapack (http://www.netlib.org/lapack/) libraries not found. 
     Directories to search for the libraries can be specified in the 
     numpy/distutils/site.cfg file (section [lapack]) or by setting 
     the LAPACK environment variable. 
     warnings.warn(LapackNotFoundError.__doc__) 
    /tmp/pip-build-q8d07pgn/numpy/numpy/distutils/system_info.py:1556: UserWarning: 
     Lapack (http://www.netlib.org/lapack/) sources not found. 
     Directories to search for the sources can be specified in the 
     numpy/distutils/site.cfg file (section [lapack_src]) or by setting 
     the LAPACK_SRC environment variable. 
     warnings.warn(LapackSrcNotFoundError.__doc__) 
    /usr/local/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'define_macros' 
     warnings.warn(msg) 
Successfully installed numpy-1.11.0 

大熊貓安裝徹底失敗:

You are using pip version 6.0.8, however version 8.1.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
Collecting pandas 
    Using cached pandas-0.18.1.tar.gz 
    package init file 'pandas/io/tests/sas/__init__.py' not found (or not a regular file) 
    warning: no directories found matching 'examples' 
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=2 in /usr/local/lib/python3.4/site-packages (from pandas) 
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /usr/local/lib/python3.4/site-packages (from pandas) 
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.7.0 in /app01/html/jay/.virtualenvs/dj/lib/python3.4/site-packages (from pandas) 
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python3.4/site-packages (from python-dateutil>=2->pandas) 
Installing collected packages: pandas 
    Running setup.py install for pandas 
...(truncated) 
    `gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app01/html/jay/.virtualenvs/dj/lib/python3.4/site-packages/numpy/core/include -I/usr/local/include/python3.4m -c pandas/src/testing.c -o build/temp.linux-x86_64-3.4/pandas/src/testing.o -Wno-unused-function 

    gcc -pthread -shared build/temp.linux-x86_64-3.4/pandas/src/testing.o -lm -o build/lib.linux-x86_64-3.4/pandas/_testing.cpython-34m.so 

    skipping 'pandas/msgpack/_packer.cpp' Cython extension (up-to-date) 

    building 'pandas.msgpack._packer' extension 

    creating build/temp.linux-x86_64-3.4/pandas/msgpack 

    gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D__LITTLE_ENDIAN__=1 -Ipandas/src/msgpack -Ipandas/src/klib -Ipandas/src -I/app01/html/jay/.virtualenvs/dj/lib/python3.4/site-packages/numpy/core/include -I/usr/local/include/python3.4m -c pandas/msgpack/_packer.cpp -o build/temp.linux-x86_64-3.4/pandas/msgpack/_packer.o -Wno-unused-function 

    gcc: error trying to exec 'cc1plus': execvp: No such file or directory 

    error: command 'gcc' failed with exit status 1 

    ---------------------------------------- 
    Command "/app01/html/jay/.virtualenvs/dj/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-oi7a9h9i/pandas/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-e5lrr_if-record/install-record.txt --single-version-externally-managed --compile --install-headers /app01/html/jay/.virtualenvs/dj/include/site/python3.4" failed with error code 1 in /tmp/pip-build-oi7a9h9i/pandas 

我試圖創建交換文件只是爲了消除內存問題,沒有幫助。

我能夠與

sudo apt-get install python-pandas 

安裝熊貓但這安裝熊貓爲系統默認的Python 2.7。我在虛擬環境中使用python 3.4。

有什麼建議嗎?

回答

2

我注意到,開始了我的錯誤,這一點:

You are using pip version 6.0.8, however version 8.1.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
Collecting numpy 
    Using cached numpy-1.11.0.tar.gz 
    Running from numpy source directory. 
Installing collected packages: numpy 
    Running setup.py install for numpy 
Note: if you need reliable uninstall behavior, then install 
with pip instead of using `setup.py install`: 
    - `pip install .`  (from a git repo or downloaded source 
          release) 
    - `pip install numpy` (last Numpy release on PyPi) 

這最後固定我的問題:全球

升級畫中畫(PIP舊版本到6.0.8新版本8.1.2):

sudo pip3 install --upgrade pip

在的virtualenv,

pip3 install numpy pip3 install pandas