2017-04-07 86 views
0

我有一個使用一個小的項目:的Python:在setup.py處理numpy的,SciPy的和matplotlib依賴

import numpy as np 
import _csv 
from datetime import datetime, timedelta 
from scipy.stats.stats import pearsonr 
import matplotlib.pyplot as plt 

所以我寫了一個簡單setup.py吧:

from setuptools import setup, find_packages 


setup(
    install_requires=['numpy', 'matplotlib', "scipy"] 
) 

當我運行python setup.py安裝我得到這個錯誤:

Searching for scipy 
Reading https://pypi.python.org/simple/scipy/ 
Best match: scipy 0.19.0 
Downloading https://pypi.python.org/packages/e5/93/9a8290e7eb5d4f7cb53b9a7ad7b92b9827ecceaddfd04c2a83f195d8767d/scipy-0.19.0.zip#md5=91b8396231eec780222a57703d3ec550 
Processing scipy-0.19.0.zip 
Writing /tmp/easy_install-EBVjVf/scipy-0.19.0/setup.cfg 
Running scipy-0.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EBVjVf/scipy-0.19.0/egg-dist-tmp-enWoYn 
/tmp/easy_install-EBVjVf/scipy-0.19.0/setup.py:323: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates 
    warnings.warn("Unrecognized setuptools command, proceeding with " 
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1408: 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__) 
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1419: 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__) 
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1422: 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__) 
Warning: distutils distribution has been initialized, it may be too late to add an extension _vqWarning: distutils distribution has been initialized, it may be too late to add an extension _hierarchyWarning: distutils distribution has been initialized, it may be too late to add a subpackage clusterWarning: distutils distribution has been initialized, it may be too late to add a subpackage constantsWarning: distutils distribution has been initialized, it may be too late to add a library dfftpackWarning: distutils distribution has been initialized, it may be too late to add a library fftpackWarning: distutils distribution has been initialized, it may be too late to add an extension _fftpackWarning: distutils distribution has been initialized, it may be too late to add an extension convolveWarning: distutils distribution has been initialized, it may be too late to add a subpackage fftpackRunning from scipy source directory. 
Warning: distutils distribution has been initialized, it may be too late to add a library machWarning: distutils distribution has been initialized, it may be too late to add a library quadpackWarning: distutils distribution has been initialized, it may be too late to add a library odepackWarning: distutils distribution has been initialized, it may be too late to add a library dopnon-existing path in 'scipy/integrate': 'quadpack.h' 
Warning: distutils distribution has been initialized, it may be too late to add an extension _quadpackWarning: distutils distribution has been initialized, it may be too late to add an extension _odepackWarning: distutils distribution has been initialized, it may be too late to add an extension vodeWarning: distutils distribution has been initialized, it may be too late to add an extension lsodaWarning: distutils distribution has been initialized, it may be too late to add an extension _dopWarning: distutils distribution has been initialized, it may be too late to add an extension _test_multivariateWarning: distutils distribution has been initialized, it may be too late to add an extension _test_odeint_bandedWarning: distutils distribution has been initialized, it may be too late to add a subpackage integrateWarning: distutils distribution has been initialized, it may be too late to add a library fitpackWarning: distutils distribution has been initialized, it may be too late to add an extension interpndWarning: distutils distribution has been initialized, it may be too late to add an extension _ppolyWarning: distutils distribution has been initialized, it may be too late to add an extension _bsplWarning: distutils distribution has been initialized, it may be too late to add an extension _fitpackWarning: distutils distribution has been initialized, it may be too late to add an extension dfitpackWarning: distutils distribution has been initialized, it may be too late to add an extension _interpolateWarning: distutils distribution has been initialized, it may be too late to add a subpackage interpolateWarning: distutils distribution has been initialized, it may be too late to add an extension streamsWarning: distutils distribution has been initialized, it may be too late to add an extension mio_utilsWarning: distutils distribution has been initialized, it may be too late to add an extension mio5_utilsWarning: distutils distribution has been initialized, it may be too late to add a subpackage matlabWarning: distutils distribution has been initialized, it may be too late to add a subpackage arffWarning: distutils distribution has been initialized, it may be too late to add a subpackage harwell_boeingWarning: distutils distribution has been initialized, it may be too late to add a subpackage ioerror: no lapack/blas resources found 

有別的我應該添加到setup.py?

回答

0

這似乎是一個缺少標題的問題。您可以嘗試安裝這些軟件包:

sudo apt-get install libatlas-dev liblapack-dev

相關問題