问题:用pip安装SciPy

使用可以通过pip安装NumPypip install numpy

SciPy是否有类似的可能性?(这样pip install scipy做无效。)


更新资料

SciPy软件包现在可以安装了pip

It is possible to install NumPy with pip using pip install numpy.

Is there a similar possibility with SciPy? (Doing pip install scipy does not work.)


Update

The package SciPy is now available to be installed with pip!


回答 0

试图easy_install指出其在Python Package Index中列出的问题,该点会进行搜索。

easy_install scipy
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

但是,一切并没有丢失。pip可以从Subversion(SVN),GitMercurialBazaar存储库安装。SciPy使用SVN:

pip install svn+http://svn.scipy.org/svn/scipy/trunk/#egg=scipy

更新(12-2012):

pip install git+https://github.com/scipy/scipy.git

由于NumPy是依赖项,因此也应安装它。

An attempt to easy_install indicates a problem with their listing in the Python Package Index, which pip searches.

easy_install scipy
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

All is not lost, however; pip can install from Subversion (SVN), Git, Mercurial, and Bazaar repositories. SciPy uses SVN:

pip install svn+http://svn.scipy.org/svn/scipy/trunk/#egg=scipy

Update (12-2012):

pip install git+https://github.com/scipy/scipy.git

Since NumPy is a dependency, it should be installed as well.


回答 1

先决条件:

sudo apt-get install build-essential gfortran libatlas-base-dev python-pip python-dev
sudo pip install --upgrade pip

实际包装:

sudo pip install numpy
sudo pip install scipy

可选软件包:

sudo pip install matplotlib   OR  sudo apt-get install python-matplotlib
sudo pip install -U scikit-learn
sudo pip install pandas

src

Prerequisite:

sudo apt-get install build-essential gfortran libatlas-base-dev python-pip python-dev
sudo pip install --upgrade pip

Actual packages:

sudo pip install numpy
sudo pip install scipy

Optional packages:

sudo pip install matplotlib   OR  sudo apt-get install python-matplotlib
sudo pip install -U scikit-learn
sudo pip install pandas

src


回答 2

在Ubuntu 10.04(Lucid)中,pip install scipy安装某些依赖项后,我可以成功地(在virtualenv中):

$ sudo apt-get install libamd2.2.0 libblas3gf libc6 libgcc1 libgfortran3 liblapack3gf libumfpack5.4.0 libstdc++6 build-essential gfortran libatlas-sse2-dev python-all-dev

In Ubuntu 10.04 (Lucid), I could successfully pip install scipy (within a virtualenv) after installing some of its dependencies, in particular:

$ sudo apt-get install libamd2.2.0 libblas3gf libc6 libgcc1 libgfortran3 liblapack3gf libumfpack5.4.0 libstdc++6 build-essential gfortran libatlas-sse2-dev python-all-dev

回答 3

要在Windows上安装scipy,请遵循以下说明:-

步骤1:按此链接http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy下载scipy .whl文件(例如scipy-0.17.0-cp34-none-win_amd64.whl)。

步骤2:从命令提示符(cd folder-name)转到下载文件所在的目录。

步骤3:运行以下命令:

pip install scipy-0.17.0-cp27-none-win_amd64.whl

To install scipy on windows follow these instructions:-

Step-1 : Press this link http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy to download a scipy .whl file (e.g. scipy-0.17.0-cp34-none-win_amd64.whl).

Step-2: Go to the directory where that download file is there from the command prompt (cd folder-name ).

Step-3: Run this command:

pip install scipy-0.17.0-cp27-none-win_amd64.whl

回答 4

我尝试了以上所有方法,但对我没有任何帮助。这解决了我所有的问题:

pip install -U numpy

pip install -U scipy

请注意,-U用于pip install请求升级软件包的选项。没有它,如果已经安装了软件包,pip则会通知您此信息,并且不做任何事情就退出。

I tried all the above and nothing worked for me. This solved all my problems:

pip install -U numpy

pip install -U scipy

Note that the -U option to pip install requests that the package be upgraded. Without it, if the package is already installed pip will inform you of this and exit without doing anything.


回答 5

如果我首先将BLAS,LAPACK和GCC Fortran作为系统软件包安装(我正在使用Arch Linux),则可以通过以下方式安装SciPy:

pip install scipy

If I first install BLAS, LAPACK and GCC Fortran as system packages (I’m using Arch Linux), I can get SciPy installed with:

pip install scipy

回答 6

在Fedora上,这有效:

sudo yum install -y python-pip
sudo yum install -y lapack lapack-devel blas blas-devel 
sudo yum install -y blas-static lapack-static
sudo pip install numpy
sudo pip install scipy

如果public key下载时出现任何错误,请将--nogpgcheck作为参数添加到yum,例如: yum --nogpgcheck install blas-devel

从Fedora 23开始,使用dnf代替yum

On Fedora, this works:

sudo yum install -y python-pip
sudo yum install -y lapack lapack-devel blas blas-devel 
sudo yum install -y blas-static lapack-static
sudo pip install numpy
sudo pip install scipy

If you get any public key errors while downloading, add --nogpgcheck as parameter to yum, for example: yum --nogpgcheck install blas-devel

On Fedora 23 onwards, use dnf instead of yum.


回答 7

对于Arch Linux用户:

pip install --user scipy 先决条件要安装以下Arch软件包:

  • gcc-fortran
  • blas
  • lapack

For the Arch Linux users:

pip install --user scipy prerequisites the following Arch packages to be installed:

  • gcc-fortran
  • blas
  • lapack

回答 8

适用于Ubuntu(Ubuntu 10.04 LTS(Lucid Lynx))的插件:

存储库已移动,但是

pip install -e git+http://github.com/scipy/scipy/#egg=scipy

我失败了…通过以下步骤,最终解决了问题(作为虚拟环境中的root,python3指向Python 3.2.2的链接):安装Ubuntu依赖项(请参阅elaichi),克隆NumPy和SciPy:

git clone git://github.com/scipy/scipy.git scipy

git clone git://github.com/numpy/numpy.git numpy

生成NumPy(在numpy文件夹中):

python3 setup.py build --fcompiler=gnu95

安装SciPy(在scipy文件夹中):

python3 setup.py install

Addon for Ubuntu (Ubuntu 10.04 LTS (Lucid Lynx)):

The repository moved, but a

pip install -e git+http://github.com/scipy/scipy/#egg=scipy

failed for me… With the following steps, it finally worked out (as root in a virtual environment, where python3 is a link to Python 3.2.2): install the Ubuntu dependencies (see elaichi), clone NumPy and SciPy:

git clone git://github.com/scipy/scipy.git scipy

git clone git://github.com/numpy/numpy.git numpy

Build NumPy (within the numpy folder):

python3 setup.py build --fcompiler=gnu95

Install SciPy (within the scipy folder):

python3 setup.py install

回答 9

就我而言,直到我还安装了以下软件包,该软件包才起作用:libatlas-base-dev,gfortran

 sudo apt-get install libatlas-base-dev gfortran

然后运行pip install scipy

In my case, it wasn’t working until I also installed the following package : libatlas-base-dev, gfortran

 sudo apt-get install libatlas-base-dev gfortran

Then run pip install scipy


回答 10

  1. 安装python-3.4.4
  2. scipy-0.15.1-win32-superpack-python3.4
  3. 应用以下推荐文档
py -m pip install --upgrade pip
py -m pip install numpy
py -m pip install matplotlib
py -m pip install scipy
py -m pip install scikit-learn
  1. install python-3.4.4
  2. scipy-0.15.1-win32-superpack-python3.4
  3. apply the following commend doc
py -m pip install --upgrade pip
py -m pip install numpy
py -m pip install matplotlib
py -m pip install scipy
py -m pip install scikit-learn

回答 11

答案是肯定的。

首先,您可以轻松安装numpy use命令:

pip install numpy

然后,您应该安装Scipy所需的mkl,然后可以在此处下载

下载file_name.whl后,您进行安装

C:\Users\****\Desktop\a> pip install mkl_service-1.1.2-cp35-cp35m-win32.whl
Processing c:\users\****\desktop\a\mkl_service-1.1.2-cp35-cp35m-win32.whl 
Installing collected packages: mkl-service    
Successfully installed mkl-service-1.1.2

然后,您可以在同一网站上下载scipy-0.18.1-cp35-cp35m-win32.whl

注意:您应该根据您的python版本下载file_name.whl,如果您的python版本是32bit python3.5,则应该下载该文件,而“ win32”是您的python版本,而不是操作系统版本。

然后像这样安装file_name.whl:

C:\Users\****\Desktop\a>pip install scipy-0.18.1-cp35-cp35m-win32.whl
Processing c:\users\****\desktop\a\scipy-0.18.1-cp35-cp35m-win32.whl
Installing collected packages: scipy
Successfully installed scipy-0.18.1

然后,只有一件事要做:注释掉特定的一行,否则当您输入命令“ import scipy”时会出现错误消息。

所以注释掉这行

from numpy._distributor_init import NUMPY_MKL  # requires numpy+mkl

在此文件中:your_own_path \ lib \ site-packages \ scipy__init __。py

然后您可以使用SciPy :)

这里告诉您更多有关最后一步的信息。

是一个类似问题的答案。

The answer is yes, there is.

First you can easily install numpy use commands:

pip install numpy

Then you should install mkl, which is required by Scipy, and you can download it here

After download the file_name.whl you install it

C:\Users\****\Desktop\a> pip install mkl_service-1.1.2-cp35-cp35m-win32.whl
Processing c:\users\****\desktop\a\mkl_service-1.1.2-cp35-cp35m-win32.whl 
Installing collected packages: mkl-service    
Successfully installed mkl-service-1.1.2

Then at the same website you can download scipy-0.18.1-cp35-cp35m-win32.whl

Note:You should download the file_name.whl according to you python version, if you python version is 32bit python3.5 you should download this one, and the “win32” is about your python version, not your operating system version.

Then install file_name.whl like this:

C:\Users\****\Desktop\a>pip install scipy-0.18.1-cp35-cp35m-win32.whl
Processing c:\users\****\desktop\a\scipy-0.18.1-cp35-cp35m-win32.whl
Installing collected packages: scipy
Successfully installed scipy-0.18.1

Then there is only one more thing to do: comment out a specfic line or there will be error messages when you imput command “import scipy”.

So comment out this line

from numpy._distributor_init import NUMPY_MKL  # requires numpy+mkl

in this file: your_own_path\lib\site-packages\scipy__init__.py

Then you can use SciPy :)

Here tells you more about the last step.

Here is a similar anwser to a similar question.


回答 12

除了所有这些答案之外,如果在64位计算机上安装32位python,则无论您的计算机如何,都必须下载32位scipy。 http://www.lfd.uci.edu/~gohlke/pythonlibs/ 在上述URL中,您可以下载软件包,命令为:pip install

Besides all of these answers, If you install python of 32bit on your 64bit machine, you have to download scipy of 32-bit irrespective of your machine. http://www.lfd.uci.edu/~gohlke/pythonlibs/ In the above URL you can download the packages and command is: pip install


回答 13

对于gentoo,它位于主存储库中: emerge --ask scipy

For gentoo, it’s in the main repository: emerge --ask scipy


回答 14

您也可以在Windows中使用python 3.6使用它 python -m pip install scipy

You can also use this in windows with python 3.6 python -m pip install scipy


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。