Skip to content

Numpy API compatibility breaks 2.7.1 #12

Description

@jonas-eschle

With 2.7.1, there is an error when importing nlopt having a numpy version<1.22 installed.

Steps to reproduce:
install numpy<1.22, install nlopt

I think this is related to pypa/pip#9542

Error message:

RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jonas/anaconda3/envs/tmp38/lib/python3.8/site-packages/nlopt/__init__.py", line 1, in <module>
    from .nlopt import *
  File "/home/jonas/anaconda3/envs/tmp38/lib/python3.8/site-packages/nlopt/nlopt.py", line 20, in <module>
    from . import _nlopt
ImportError: numpy.core.multiarray failed to import

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions