Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chaco 6.0.0 installation failed with Numpy 1.26.4 #910

Open
henridbr opened this issue Apr 9, 2024 · 6 comments
Open

Chaco 6.0.0 installation failed with Numpy 1.26.4 #910

henridbr opened this issue Apr 9, 2024 · 6 comments

Comments

@henridbr
Copy link

henridbr commented Apr 9, 2024

Problem Description
Failing to build wheel for chaco due to numpy version check.
With Python 3.12.2, numpy 1.26.4, chaco 6.0.0 installation failed.
Script chaco/plots/contour/cntr.c is calling for files which does not exist in numpy anymore.

Reproduction Steps:

pip install chaco 
[...]
creating build\temp.win-amd64-cpython-312\Release\chaco\plots\contour
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DNUMPY -IC:\Users\henri\AppData\Local\Temp\pip-build-env-yp634vpe\overlay\Lib\site-packages\numpy\core\include "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\include" "-IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcchaco/plots/contour/cntr.c /Fobuild\temp.win-amd64-cpython-312\Release\chaco/plots/contour/cntr.obj
      cntr.c
      C:\Users\henri\AppData\Local\Temp\pip-build-env-yp634vpe\overlay\Lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
      chaco/plots/contour/cntr.c(35): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'numpy/oldnumeric.h'ÿ: No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for chaco
Failed to build chaco
ERROR: Could not build wheels for chaco, which is required to install pyproject.toml-based `projects`

Expected behavior:
To get chaco installed, chaco/plots/contour/cntr.c might be corrected.

OS, Python version: [Win 11, Visual Studio Code and Python 3.12.2]

@limpkin
Copy link

limpkin commented Apr 18, 2024

I'm also experiencing this issue... did you manage to find a local fix?

@henridbr
Copy link
Author

henridbr commented Apr 18, 2024

Hi limpkin,

I wanted to use the GUI of your CDM324 Doppler Speed Sensor, but was stopped by this issue.
I failed to correct it.

Numpy version is 1.26.4 right now and chaco has not been maintained since last year.

Regards.
Henri

@limpkin
Copy link

limpkin commented Apr 18, 2024

Yup, another customer reported that issue to me so I'm trying to see what I can do...
I'm going to experiment and report back

@limpkin
Copy link

limpkin commented Apr 18, 2024

so I innocently copy pasted the contents of https://github.com/huggingface/neuralcoref/blob/master/include/numpy/oldnumeric.h into the #ifdef but am now getting a whole new bunch of issues...

` Error compiling Cython file:
------------------------------------------------------------
...
# Thanks for using Enthought open source!
import cython
import numpy as np
from numpy cimport uint8_t

  cimport _marker_renderer
          ^
  ------------------------------------------------------------

  kiva\_marker_renderer.pyx:14:8: '_marker_renderer.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  
  import numpy as np
  from numpy cimport uint8_t

  cimport _marker_renderer

  ctypedef _marker_renderer.marker_renderer_base renderer_base_t
           ^
  ------------------------------------------------------------

  kiva\_marker_renderer.pyx:16:9: 'marker_renderer_base' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

          self._this.transform(_sx, _sy, _shx, _shy, _tx, _ty)


  # Template specializations
  ctypedef _marker_renderer.marker_renderer[_marker_renderer.pixfmt_abgr32] renderer_abgr32_t
           ^
  ------------------------------------------------------------

  kiva\_marker_renderer.pyx:91:9: 'marker_renderer' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          self._this.transform(_sx, _sy, _shx, _shy, _tx, _ty)


  # Template specializations
  ctypedef _marker_renderer.marker_renderer[_marker_renderer.pixfmt_abgr32] renderer_abgr32_t
  ctypedef _marker_renderer.marker_renderer[_marker_renderer.pixfmt_argb32] renderer_argb32_t
           ^`

@limpkin
Copy link

limpkin commented Apr 18, 2024

ok so I managed to install everything but that wasn't straight forward. In short, I found a previous version of the missing oldnumeric.h file, and pasted its contents into the cntr.ch
You'll need to:

@henridbr
Copy link
Author

Thank you for this trick, it works fine for me.
Sorry for my mistake when answering, I quoted a wrong script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants