Closed silviamorins closed 6 years ago
Hi Silvia,
Did you install the cplex python bindings?
What is the result of running python -c 'import cplex'
in a terminal?
I don't get any result:
u-172-c057:~ username$ python -c 'import cplex' u-172-c057:~ username$
Do I have to conclude that I haven't installed the bindings?
No, it seems to be installed, otherwise, there would be an import error.
Could you please tell me the output from this one just to confirm?
python -c 'from cplex import Cplex; print Cplex().get_version()'
It's: 12.8.0.0
It could be your cplex version (we have only tested for cplex 12.7).
It might be just a small fix to update to 12.8, but unfortunately I cannot download cplex at the moment.
Would it be possible for you to downgrade to 12.7?
I will try to download it again; is version 12.7.1 supposed to be ok? I think 12.7 doesn't match my OS (macOS Sierra).
I believe I used 12.7.0 with both Sierra and High Sierra. But 12.7.1 should be fine, as there should be no major API changes.
You can also email me directly at daniel (dot) machado (at) embl (dot) de, if you have further questions.
Sorry for the delay. I finally installed cplex 12.8, but I am not able to reproduce your error. Maybe there is something strange about your python installation (?). I will close this for now. Please feel free to re-open this issue if the problem persists.
I have the same exact issue in High Sierra and my cplex version seems to be 12.8.0.0 Should I downgrade to test? Or can I run some other tests?
Could you please run the two following commands and tell me the output of each one?
python -c 'from cplex import Cplex; print Cplex().get_version()'
python -c 'from framed.solvers.cplex_interface import CplexSolver; print CplexSolver.__name__'
Voila:
[~]$ python -c 'from cplex import Cplex; print Cplex().get_version()'
12.8.0.0
[~]$ python -c 'from framed.solvers.cplex_interface import CplexSolver; print CplexSolver.__name__'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named framed.solvers.cplex_interface
Ok... what about this?
python -c 'import framed'
Same error:
[~]$ python -c 'import framed'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named framed
Should I have installed these modules prior to installation?
Strange, they should be automatically installed. Did you install CarveMe with pip install carveme
?
Yes, I installed with pip install. I also tried to manually install "framed" and now I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/mdesouzafe/miniconda2/lib/python2.7/site-packages/framed/__init__.py", line 3, in <module>
from .cobra.phaseplane import PhPP
File "/Users/mdesouzafe/miniconda2/lib/python2.7/site-packages/framed/cobra/phaseplane.py", line 13, in <module>
import matplotlib.pyplot as plt
File "/Users/mdesouzafe/miniconda2/lib/python2.7/site-packages/matplotlib/pyplot.py", line 115, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/Users/mdesouzafe/miniconda2/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup [backend_name], 0)
File "/Users/mdesouzafe/miniconda2/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py", line 17, in <module>
from matplotlib.backends import _macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.
Should I create a virtualenv ? If yes, should I install carveme directly inside the virtualenv ?
That's a typical matplotlib installation error. The best way to avoid it is to install matplotlib using conda.
But please do not install CarveMe or framed manually, just follow the installation instructions in the documentation: http://carveme.readthedocs.io/en/latest/installation.html
Got it! Works like a charm!! :D Thanks!
Great :)
No, it seems to be installed, otherwise, there would be an import error.
Could you please tell me the output from this one just to confirm?
python -c 'from cplex import Cplex; print Cplex().get_version()'
In my case, I get the result: File "
", line 1 from cplex import Cplex; print Cplex().get_version() ^ SyntaxError: invalid syntax
I just installed CarveMe and am trying to build a draft reconstruction from an annotated genome I have. When executing the program, however, I get the following lines:
u-172-c057:~ username$ carve /User/Documents/filename.gff Traceback (most recent call last): File "/usr/local/bin/carve", line 3, in <module> from carveme import config, project_dir File "/usr/local/lib/python2.7/site-packages/carveme/__init__.py", line 12, in <module> set_default_solver(config.get('solver', 'default_solver')) File "/usr/local/lib/python2.7/site-packages/framed/solvers/__init__.py", line 61, in set_default_solver raise EnvironmentError("Solver '{}' not available.".format(solvername)) EnvironmentError: Solver 'cplex' not available.
What am I doing wrong? Thank you in advance Silvia