python - 构建 scipy 错误 cythonize 失败

标签 python scipy cython

我正在尝试构建 scipy,但出现 RuntimeError:

$sudo python setup.py build
Processing scipy/cluster/_vq_rewrite.pyx
Traceback (most recent call last):
  File "tools/cythonize.py", line 172, in <module>
    main()
  File "tools/cythonize.py", line 168, in main
    find_process_files(root_dir)
  File "tools/cythonize.py", line 160, in find_process_files
    process(cur_dir, fromfile, tofile, function, hash_db)
  File "tools/cythonize.py", line 137, in process
    processor_function(fromfile, tofile)
  File "tools/cythonize.py", line 66, in process_pyx
    raise OSError('Cython needs to be installed')
OSError: Cython needs to be installed

Traceback (most recent call last):
  File "setup.py", line 209, in <module>
    setup_package()
  File "setup.py", line 202, in setup_package
    generate_cython()
  File "setup.py", line 147, in generate_cython
    raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!

有哪些方法可以提供 cython 来纠正这个错误?

最佳答案

Python setuptools 解决了这个问题。

http://docs.cython.org/src/quickstart/install.html
easy_install cythonpip install cython

关于python - 构建 scipy 错误 cythonize 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15175135/

相关文章:

optimization - 存储 scipy griddata 使用的权重以供重复使用

cython:如何创建 cdef 类的数组

python - 你如何让 cimport 在 Cython 中工作?

python - 使用不带 HTML 'img' 标签的 Beautifulsoup 下载图像

python - 如何防止 Django fixtures 与现有数据冲突

python - python 查找并比较两个日期时间列表的最小时间增量

python - CNTK中用户定义的激活函数

python - 在 python 中滑动 Gabor 过滤器

python - 当 r=0 时,在 python 中以数值方式计算 1/r*d/dr(r*f)。 f 是 r 的函数

python - 如何测试 Cython 属性是否为生成器?