Подтвердить что ты не робот

Установка SciPy на Ubuntu

У меня запущен Python 2.7 и пытается установить scipy с помощью easy_install, который возвращает следующие ошибки:

Searching for scipy
Reading http://pypi.python.org/simple/scipy/
Reading http://www.scipy.org
Reading http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531
Reading http://new.scipy.org/Wiki/Download
Best match: scipy 0.11.0
Downloading http://pypi.python.org/packages/source/s/scipy/scipy-0.11.0.zip#md5=40b700ddde9ddab643b640fff7a9d753
Processing scipy-0.11.0.zip
Running scipy-0.11.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-49BQSz/scipy-0.11.0/egg-dist-tmp-KMjwKy
Running from scipy source directory.
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1425: 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:1434: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
/usr/lib64/python2.7/site-packages/numpy/distutils/system_info.py:1437: 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__)
error: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.

Итак, я установил Blas и Atalas, выполнив

apt-get install blas
apt-get install atlas

Однако ошибки easy_install не исчезают.

Спасибо!

4b9b3361

Ответ 1

Ubuntu помещает файлы библиотеки в довольно экзотический каталог. /usr/lib/x86_64-linux-gnu/ или что-то в зависимости от вашей архитектуры. Вам нужно добавить этот каталог в файл site.cfg или переменную среды BLAS.

Если простой установке также нужны файлы заголовков, вам необходимо установить соответствующие пакеты -dev.

Но, как предлагает @pitsanu-swangpheaw, вы также можете установить в каталог пакетов сайтов, используя диспетчер пакетов ubuntu.

sudo apt-get install python-numpy python-scipy

Ответ 2

Что сработало для меня:

Чтобы установить scipy из PIP, вам нужны пакеты libatlas-base-dev (библиотеки и т.д. для ATLAS/BLAS) и gfortran (компилятор GNU Fortran).

Как только эти пакеты установлены, программа установки scipy должна завершиться так, как ожидалось.

Ответ 3

Если вы используете Python3, вы можете установить пакеты с помощью apt-get

sudo apt-get install python3-numpy python3-scipy

Ответ 4

sudo apt-get install python-scipy работал в моем случае.

Ответ 5

Если вы хотите по-прежнему устанавливать с помощью pip, вы можете использовать build-dep для получения зависимостей python-numpy и python-scipy, а затем установить с помощью pip

sudo apt-get build-dep python-numpy python-scipy

Замените python3, поскольку другие ответы на это указывают на то, что вы ищете.

Ответ 6

Я решил проблему, выполнив (как и предыдущие предложения)

apt-get install scipy

Ответ 7

Я решаю эту проблему при запуске:

sudo pip install scipy