Giter Club home page Giter Club logo

Comments (5)

WangJiuming avatar WangJiuming commented on June 21, 2024 1

Hi Karl, my solution is to download the source code from this repo and run python setup.py install to build the package from scratch. Hope it works for you too :)

from deep-forest.

XingfuXu avatar XingfuXu commented on June 21, 2024

I also met another error:
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/init.py", line 320, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'bool'

from deep-forest.

WangJiuming avatar WangJiuming commented on June 21, 2024

Hi, I've just encountered exactly the same error after pip install deep-forest in a python=3.8 environment. I was able to fix the np.int error manually but the np.bool error seems to be hard to fix from user side.
I have also tried the following:

  1. downgrade numpy to 1.19 (<1.20), but the following error would occur:
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
  1. build from scratch with python setup.py install, but the following error would occur:
Error compiling Cython file:
------------------------------------------------------------
...
    if not is_samples_sorted[0]:
        n_samples = end - start
        memcpy(sorted_samples + start, samples + start,
               n_samples * sizeof(SIZE_t))
        qsort(sorted_samples + start, n_samples, sizeof(SIZE_t),
              compare_SIZE_t)
              ^
------------------------------------------------------------

deepforest/tree/_splitter.pyx:1040:14: Cannot assign type 'int (const void *, const void *) except? -1 nogil' to 'int (*)(const void *, const void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'int (const void *, const void *) except? -1 nogil'.

Is there any way to solve this since this issue has been recently closed as completed? Thanks in advance!

from deep-forest.

WangJiuming avatar WangJiuming commented on June 21, 2024

Solved by reinstalling cpython==0.29.14 and building from scratch.

from deep-forest.

Karlheinzniebuhr avatar Karlheinzniebuhr commented on June 21, 2024

Hi, I've just encountered exactly the same error after pip install deep-forest in a python=3.8 environment. I was able to fix the np.int error manually but the np.bool error seems to be hard to fix from user side. I have also tried the following:

  1. downgrade numpy to 1.19 (<1.20), but the following error would occur:
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
  1. build from scratch with python setup.py install, but the following error would occur:
Error compiling Cython file:
------------------------------------------------------------
...
    if not is_samples_sorted[0]:
        n_samples = end - start
        memcpy(sorted_samples + start, samples + start,
               n_samples * sizeof(SIZE_t))
        qsort(sorted_samples + start, n_samples, sizeof(SIZE_t),
              compare_SIZE_t)
              ^
------------------------------------------------------------

deepforest/tree/_splitter.pyx:1040:14: Cannot assign type 'int (const void *, const void *) except? -1 nogil' to 'int (*)(const void *, const void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'int (const void *, const void *) except? -1 nogil'.

Is there any way to solve this since this issue has been recently closed as completed? Thanks in advance!

could you please share your solution to the np.int error ? I'm getting the same issue:

AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:

from deep-forest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.