Closed vrmarcelino closed 3 years ago
That's strange, I haven't seen that one before.
Can you also run:
python -c 'import cplex; print(cplex.__version__)'
and:
python -c 'import cplex; print(dir(cplex))'
Hi!
I think the problem is that we have multiple python versions (and environments) in our server.
The first one returned an error (in the conda env):
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'cplex' has no attribute '__version__'
And dir(cplex) only returned:
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
But running the same commands using my default python returned the cplex version 20.1.0.0 and a lot more things under the dir(cplex) command.
So I just re-installed carveme outside of a conda env, and it works! =)
Thank you!!
Perfect!
Hi Daniel,
I have updated carveme to version 1.5.0 and I am now getting the error:
RuntimeError: Solver cplex not available.
I am using carveme within a conda environment, and I have re-installed the cplex Python API. When I run
python -c 'import cplex'
, I get no message, so I think the API is installed correctly. But when I runpython -c 'from cplex import Cplex
, I get:ImportError: cannot import name 'Cplex' from 'cplex' (unknown location)
Any ideas of what might be going on?Thanks!