An error is being thrown when importing pypowsybl on Windows with Python 3.12 and numpy >= 2.0.0 The issue is bypassed when downgrading numpy to 1.26.4.
The terminal prompt can be seen below.
Python 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:04:44) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pypowsybl as pp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Sergio\.conda\envs\sd_powsybl\Lib\site-packages\pypowsybl\__init__.py", line 12, in <module>
from pypowsybl import _pypowsybl, voltage_initializer
File "C:\Users\Sergio\.conda\envs\sd_powsybl\Lib\site-packages\pypowsybl\voltage_initializer\__init__.py", line 7, in <module>
from .impl.voltage_initializer import run
File "C:\Users\Sergio\.conda\envs\sd_powsybl\Lib\site-packages\pypowsybl\voltage_initializer\impl\voltage_initializer.py", line 8, in <module>
from pypowsybl.network import Network
File "C:\Users\Sergio\.conda\envs\sd_powsybl\Lib\site-packages\pypowsybl\network\__init__.py", line 9, in <module>
from .impl.network import (
File "C:\Users\Sergio\.conda\envs\sd_powsybl\Lib\site-packages\pypowsybl\network\impl\network.py", line 25, in <module>
from numpy import Inf
ImportError: cannot import name 'Inf' from 'numpy' (C:\Users\Sergio\.conda\envs\sd_powsybl\Lib\site-packages\numpy\__init__.py). Did you mean: 'inf'?
Describe the current behavior
An error is being thrown when importing
pypowsybl
on Windows with Python 3.12 andnumpy >= 2.0.0
The issue is bypassed when downgradingnumpy
to 1.26.4.The terminal prompt can be seen below.
Describe the expected behavior
No response
Describe the steps
No response
Environment
No response
Relevant Log Output
No response
Extra Information
No response