PyCharm
AnsweredI get this error in PyCharm:
ERROR: Solver (gurobi) returned non-zero return code (3221226505)
ERROR: Solver log: Fatal Python error: init_sys_streams: can't initialize sys
standard streams Traceback (most recent call last):
File "C:\Users\marii\AppData\Local\Programs\Python\Python311\Lib\io.py",
line 52, in <module> File
"C:\Users\marii\AppData\Local\Programs\Python\Python311\Lib\abc.py",
line 105
def __new__(mcls, name, bases, namespace, /, **kwargs):
^
SyntaxError: invalid syntax
python-BaseException
Traceback (most recent call last):
File "C:\Users\marii\Universidad Politécnica de Madrid - tfg\codigo\venv\Lib\site-packages\pyomo\opt\base\solvers.py", line 627, in solve
raise ApplicationError("Solver (%s) did not exit normally" % self.name)
pyomo.common.errors.ApplicationError: Solver (gurobi) did not exit normally
I'm working on an optimization in python using pyomo.
I have placed my gurobi.lic license file in C:\gurobi1003.
I have also tried to uninstall pycharm, but nothing works.
-
Hi Marina,
The line:
pyomo.common.errors.ApplicationError: Solver (gurobi) did not exit normally
is a bit misleading as this error is not related to Gurobi.
The initial cause of the error:
line 105 def __new__(mcls, name, bases, namespace, /, **kwargs): ^ SyntaxError: invalid syntax
is complaining that the "/" in the method signature of a function within Python's standard library is incorrect. This syntax is valid for Python 3.8+ and given it looks like you're trying to run Python 3.11 something has gone very wrong here, and it is almost certainly PyCharm's fault.
See the following stackoverflow post where someone encountered the same issue as yourself.
You can try and resolve the issue by exploring PyCharm configurations, but I would suggest an attractive solution would be to tell PyCharm that it's not working out between you and to go with VSCode (it has been ranked #1 IDE in the Stackoverflow Developer Survey several years in a row).
- Riley
0
Please sign in to leave a comment.
Comments
1 comment