[Debian-med-packaging] Bug#937657: Issue with numpy under Python 3.8 (Was: python-colormap: Python2 removal in sid/bullseye)

Andreas Tille andreas at an3as.eu
Sat Nov 16 07:38:17 GMT 2019


Control: tags -1 help

Hi,

I have dropped the Python2 package in Git[1] and tried to build which
ended up in:

...
I: pybuild base:217: cd /build/python-colormap-1.0.2/.pybuild/cpython3_3.8_colormap/build; python3.8 -m nose -v test
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$']
test_colors.test_hex2web ... ok
test_colors.test_web2hex ... ok
test_colors.test_rgb2yuv ... ok
test_colors.test_rgb2hsv ... ok
test_colors.test_rgb2hls ... ok
test_colors.test_hex2dec ... ok
test_colors.test_rgb2hex ... ok
test_colors.testColors ... ok
test_colors.test_normalise ... ok
test_colors.test_to_intensity ... ok
test_colors.test_colormap ... ok
test_colors.test_HEX ... ok
test_get_cmap.test_get_cmap ... ERROR
 
======================================================================
ERROR: test_get_cmap.test_get_cmap
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 17, in <module>
    from . import multiarray
  File "/usr/lib/python3/dist-packages/numpy/core/multiarray.py", line 14, in <module>
    from . import overrides
  File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/python-colormap-1.0.2/.pybuild/cpython3_3.8_colormap/build/test/test_get_cmap.py", line 5, in test_get_cmap
    get_cmap("heat")
  File "/build/python-colormap-1.0.2/.pybuild/cpython3_3.8_colormap/build/colormap/get_cmap.py", line 41, in cmap_builder
    return c.get_cmap_heat()
  File "/build/python-colormap-1.0.2/.pybuild/cpython3_3.8_colormap/build/colormap/colors.py", line 891, in get_cmap_heat
    return self.cmap(
  File "/build/python-colormap-1.0.2/.pybuild/cpython3_3.8_colormap/build/colormap/colors.py", line 852, in cmap
    import numpy as np
  File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 47, in <module>
    raise ImportError(msg)
ImportError:.

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "/usr/bin/python3.8",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.17.4" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'


----------------------------------------------------------------------
Ran 13 tests in 0.056s

FAILED (errors=1)
E: pybuild pybuild:341: test: plugin distutils failed with: exit code=1: cd /build/python-colormap-1.0.2/.pybuild/cpython3_3.8_colormap/build; python3.8 -m nose -v test
dh_auto_test: pybuild --test --test-nose -i python{version} -p "3.8 3.7" returned exit code 13
make: *** [debian/rules:13: build] Error 255


Seems there is some issue with numpy.  Any idea how to fix this?

Kind regards

      Andreas.


[1] https://salsa.debian.org/med-team/python-colormap

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list