You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created fresh virtual environment in a cloned repo (known to be in a working state). In the code I have a statement like from pyomo.environ import value - but running the file throws error even before value is called.
Steps to reproduce the issue
Not sure, but I have a setup like below
$ # assuming we are in some safe directory and having access to glpsol
$ echo"from pyomo.environ import value"> test.py
$ python3 -m venv v
$ source v\bin\activate
$ pip install wheel
$ pip install pyomo pandas openpyxl
$ python test.py
Error Message
stacktrace:
(v) abc@computer:~/code/projectName$ python optimiser.py
Traceback (most recent call last):
File "/home/abc/code/projectName/optimiser.py", line 11, in <module>
from pyomo.environ import value
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/__init__.py", line 12, in <module>
from . import common
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/common/__init__.py", line 14, in <module>
from . import log
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/common/log.py", line 30, in <module>
from pyomo.common.fileutils import PYOMO_ROOT_DIR
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/common/fileutils.py", line 45, in <module>
from .dependencies import ctypes
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/common/dependencies.py", line 1049, in <module>
numpy, numpy_available = attempt_import('numpy', callback=_finalize_numpy)
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/common/dependencies.py", line 738, in attempt_import
return _perform_import(
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/common/dependencies.py", line 768, in _perform_import
callback(module, True)
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/pyomo/common/dependencies.py", line 1002, in _finalize_numpy
_floats = [np.float_, np.float16, np.float32, np.float64]
File "/home/abc/code/projectName/v/lib/python3.10/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.. Did you mean: 'float16'?
Information on your system
Pyomo version: 6.7.3
Python version: 3.10.12
Operating system: Linux computer 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
How Pyomo was installed (PyPI, conda, source): pip
Solver (if applicable): glpsol
The text was updated successfully, but these errors were encountered:
@systechusaIN1522 - You can clone main and the issue is resolved there. We are also planning on release a new pinned version of Pyomo within the next two weeks, so if you prefer to work from official releases, that will soon be an option.
Summary
Created fresh virtual environment in a cloned repo (known to be in a working state). In the code I have a statement like
from pyomo.environ import value
- but running the file throws error even beforevalue
is called.Steps to reproduce the issue
Not sure, but I have a setup like below
Error Message
stacktrace:
Information on your system
Pyomo version: 6.7.3
Python version: 3.10.12
Operating system: Linux computer 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
How Pyomo was installed (PyPI, conda, source): pip
Solver (if applicable): glpsol
The text was updated successfully, but these errors were encountered: