0
 $ sudo python setup.py build

给了我以下内容:

Partial import of sklearn during the build process.
Generating cython files
Cythonizing sources
sklearn
Processing sklearn/_isotonic.pyx
Traceback (most recent call last):
  File "/home/scikit-learn/build_tools/cythonize.py", line 198, in <module>
    main(root_dir_arg)
  File "/home/ascikit-learn/build_tools/cythonize.py", line 190, in main
    check_and_cythonize(root_dir)
  File "/home/scikit-learn/build_tools/cythonize.py", line 182, in check_and_cythonize
    cythonize_if_unchanged(cur_dir, cython_file, gen_file, hashes)
  File "/home/scikit-learn/build_tools/cythonize.py", line 156, in cythonize_if_unchanged
    cythonize(full_cython_path, full_gen_file_path)
  File "/home/scikit-learn/build_tools/cythonize.py", line 61, in cythonize
    raise Exception('Building scikit-learn requires Cython >= 0.21')
Exception: Building scikit-learn requires Cython >= 0.21
Traceback (most recent call last):
  File "setup.py", line 297, in <module>
    setup_package()
  File "setup.py", line 280, in setup_package
    generate_cython()
  File "setup.py", line 185, in generate_cython
    raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!

安装 cython 时:

Processing ./Cython-0.24-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: Cython
  Found existing installation: Cython 0.24
    Uninstalling Cython-0.24:
      Successfully uninstalled Cython-0.24
Successfully installed Cython-0.24
4

0 回答 0