pypy下可以安装scipy吗? [英] Is it possible to install scipy under pypy?

查看:159
本文介绍了pypy下可以安装scipy吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用pypy创建了一个virtualenv并尝试安装scipy,但安装以以下错误结束:

I created a virtualenv with pypy and tried to install scipy, but installation ended with the following error:

distutils.errors.DistutilsError: 安装脚本退出时出现错误:命令cc -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE1GE_S4RCE_=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Inumpy/core/include -Ibuild/src.linux-x86_64-3.2/numpy/core/include/numpy-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort-I/home/luke/Programowanie/Python/connect4/venv-pypy/include -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -c numpy/core/src/multiarray/scalarapi.c -o build/temp.linux-x86_64-3.2/numpy/core/src/multiarray/scalarapi.o" 失败,退出状态为 1

distutils.errors.DistutilsError: Setup script exited with error: Command "cc -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -O2 -fPIC -Wimplicit -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Inumpy/core/include -Ibuild/src.linux-x86_64-3.2/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/home/luke/Programowanie/Python/connect4/venv-pypy/include -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -Ibuild/src.linux-x86_64-3.2/numpy/core/src/private -c numpy/core/src/multiarray/scalarapi.c -o build/temp.linux-x86_64-3.2/numpy/core/src/multiarray/scalarapi.o" failed with exit status 1

有一个特定的 numpy 版本适合 pypy,但我发现的关于 scipy 的唯一东西是旧的呼吁捐款.从那以后有什么变化吗?

There is a specific numpy version suited for pypy, but the only thing I found about scipy is an old call for donations. Has anything changed since then?

推荐答案

是的,有可能,从 Scipy 1.1.0.然而,需要足够新的 PyPy (>= 6.0.0) 和 Numpy,numpy>= 1.14.3,最好在发布时 numpy>=1.15.0.安装可以通过通常的方式完成

Yes, it is possible, starting from Scipy 1.1.0. New enough PyPy (>= 6.0.0) and Numpy are however required, numpy>= 1.14.3, and preferably numpy>=1.15.0 when it's released. Installation can be done via the usual

pypy3 -mpip install numpy
pypy3 -mpip install scipy

假设你已经安装了 BLAS/LAPACK,那么首先你应该确保你能够从源代码在普通 Python 上安装 numpy/scipy.

assuming you have BLAS/LAPACK installed, so first you should make sure you are able to install numpy/scipy on normal Python from sources.

可能没有人尝试过这是否适用于 Windows 上的 Pypy,所以您只能靠自己.它也可能不适用于 NumPyPy ---您需要香草 Numpy.

Nobody probably has tried whether this works with Pypy on Windows, so you are on your own there. It also probably won't work with NumPyPy --- you need the vanilla Numpy.

其他答案说不",因为那是 2018 年 5 月之前的情况.

The other answers say "No" since that was the situation before May 2018.

这篇关于pypy下可以安装scipy吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆