0

如何确保并确认我安装的 SciPy 包具有可用的 pythran 优化功能?我正在从 python 软件基金会网站安装 python 3.9.5,使用 PyCharm IDE 进行包管理,使用 pip 设置包。

4

1 回答 1

0

如果您使用 pip 从 PyPI 安装 SciPy 1.7.0 轮,它将默认包含 Pythran 模块(可以通过SCIPY_USE_PYTHRAN=0在构建时设置环境变量来排除扩展)。

>>> import scipy.interpolate._rbfinterp_pythran
>>> help(scipy.interpolate._rbfinterp_pythran)
Help on module scipy.interpolate._rbfinterp_pythran in scipy.interpolate:

NAME
    scipy.interpolate._rbfinterp_pythran

DATA
    __pythran__ = ('0.9.11', '2021-06-19 21:59:20.760235', '3c30425550c454...

FILE
    ...\lib\site-packages\scipy\interpolate\_rbfinterp_pythran.cp39-win_amd64.pyd
于 2021-06-24T00:10:28.123 回答