PYNQ-ComputerVision icon indicating copy to clipboard operation
PYNQ-ComputerVision copied to clipboard

Building fails with release 2.5

Open ralphrmartin opened this issue 4 years ago • 2 comments

Has this project been abandoned? Under release 2.5, it fails to build numpy.

I dont understand even why its trying to do that as numpy is already installed...:

This is on a Pynq - Z2 board.

Building wheels for collected packages: numpy
  Running setup.py bdist_wheel for numpy ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jxkgnmyl/numpy/setup.py
';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
bdist_wheel -d /tmp/tmp6o2_0keppip-wheel- --python-tag cp36:
  Running from numpy source directory.
  Cythonizing sources
  Processing numpy/random/_bounded_integers.pxd.in
  Processing numpy/random/_common.pyx
  Traceback (most recent call last):
    File "/tmp/pip-build-jxkgnmyl/numpy/tools/cythonize.py", line 238, in <module>
      main()
    File "/tmp/pip-build-jxkgnmyl/numpy/tools/cythonize.py", line 234, in main
      find_process_files(root_dir)
    File "/tmp/pip-build-jxkgnmyl/numpy/tools/cythonize.py", line 225, in find_process_files
      process(root_dir, fromfile, tofile, function, hash_db)
    File "/tmp/pip-build-jxkgnmyl/numpy/tools/cythonize.py", line 191, in process
      processor_function(fromfile, tofile)
    File "/tmp/pip-build-jxkgnmyl/numpy/tools/cythonize.py", line 79, in process_pyx
      VENDOR, required_version))
  RuntimeError: Building NumPy requires Cython >= 0.29.14
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-jxkgnmyl/numpy/setup.py", line 488, in <module>
      setup_package()
    File "/tmp/pip-build-jxkgnmyl/numpy/setup.py", line 469, in setup_package
      generate_cython()
    File "/tmp/pip-build-jxkgnmyl/numpy/setup.py", line 275, in generate_cython
      raise RuntimeError("Running cythonize failed!")
  RuntimeError: Running cythonize failed!

  ----------------------------------------
  Failed building wheel for numpy
  Running setup.py clean for numpy
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-jxkgnmyl/numpy/setup.py
';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
clean --all:
  Running from numpy source directory.

  `setup.py clean` is not supported, use one of the following instead:

    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)

  Add `--force` to your command to use it anyway if you must (unsupported).


  ----------------------------------------
  Failed cleaning build dir for numpy
Failed to build numpy

ralphrmartin avatar Jan 07 '20 17:01 ralphrmartin

I tried manually installing cython with "apt-get install cython" but that installed version 0.26.1-0.4 and I see that the error message above says "Building NumPy requires Cython >= 0.29.14".

Is there any straightforward way to proceed?

ralphrmartin avatar Jan 07 '20 17:01 ralphrmartin

OK, the trick was to do pip3 install --upgrade Cython first

ralphrmartin avatar Jan 07 '20 18:01 ralphrmartin