Skip to content

Numpy Dependencies Error When Importing Modules #67

@Sahil1709

Description

@Sahil1709

After following all the setup steps while trying to import all the modules, I encountered a NumPy dependencies error:

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some modules may need to rebuild instead, e.g., with 'pybind11>=2.12'.

It suggests either downgrading NumPy to <2 or upgrading the affected module. After some investigation, I found that NumPy 1.23.0 works perfectly with all other dependencies in the project. To resolve the issue:

  • Run pip install numpy==1.23.0.

Additional Note for Windows Users:
For those using Windows, you'll need to install Microsoft Visual Studio Build Tools before installing numpy<2. This step ensures the correct compilation and installation of dependencies.

This fix resolved the issue on my setup, and I believe it will help others encountering the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions