Closed matthiaskoenig closed 8 years ago
Hi, since you built from source could you give your installed solvers (GLPK, Gurobi, etc) and their versions. The problem seems to be that you get another solution for the fluxes. Tabulate definitely needs to be added to setup.py...
tabulate is included in setup.py, right after pandas:
'display': ["matplotlib", "palettable", "pandas>=0.17.0", "tabulate"]
I'm not sure if these get installed by default, though. Not sure why pandas was included under display.
I just installed the latest gurobi and mosek.
cobra.solvers.solver_dict
Out[2]:
{'gurobi': <module 'cobra.solvers.gurobi_solver' from '/usr/local/lib/python2.7/dist-packages/cobra-0.4.2b2.post25-py2.7-linux-x86_64.egg/cobra/solvers/gurobi_solver.pyc'>,
'mosek': <module 'cobra.solvers.mosek' from '/usr/local/lib/python2.7/dist-packages/cobra-0.4.2b2.post25-py2.7-linux-x86_64.egg/cobra/solvers/mosek.pyc'>}
I wanted to try pyglpk first but was unable to get a working pyglpk on Ubuntu 16.04. The basic installation does not work and the import of the solver fails with
/usr/local/lib/python2.7/dist-packages/ply/yacc.pyc in yacc(method, debug, module, tabmodule, start, check_recursion, optimize, write_tables, debugfile, outputdir, debuglog, errorlog, picklefile)
3283 read_signature = lr.read_pickle(picklefile)
3284 else:
-> 3285 read_signature = lr.read_table(tabmodule)
3286 if optimize or (read_signature == signature):
3287 try:
/usr/local/lib/python2.7/dist-packages/ply/yacc.pyc in read_table(self, module)
1983 parsetab = sys.modules[module]
1984
-> 1985 if parsetab._tabversion != __tabversion__:
1986 raise VersionError('yacc table file version is out of date')
1987
AttributeError: 'module' object has no attribute '_tabversion'
I tried to install with
sudo apt-get install python-dev libglpk-dev python-glpk
which worked on Ubuntu 14.04, but does not work on 16.04 any more. So if someone has pyglpk as solver working on Ubuntu 16.04 I would like to know how (without conda or downgrading packages). M
Just noticed the versions are missing: Gurobi Interactive Shell (linux64), Version 6.5.2 MOSEK Version 7.1.0.55 (Build date: 2016-8-26 12:20:25)
@pstjohn The extras are not installed default. I think they can be installed via
setup.py install -e .[matlab,sbml,array,display]
Ah ok, perfect.
On Wed, Sep 7, 2016, 09:04 Peter St. John notifications@github.com wrote:
tabulate is included in setup.py, right after pandas:
'display': ["matplotlib", "palettable", "pandas>=0.17.0", "tabulate"]
I'm not sure if these get installed by default, though. Not sure why pandas was included under display.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/opencobra/cobrapy/issues/277#issuecomment-245290657, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0pDzxfKO2RSjVaVBoIzCBlg7u3VRVaks5qnsRpgaJpZM4J2sXO .
Christian Diener <mail@cdiener.com ch.diener@gmail.com>
For encrypted communication you may use the following public key: https://cdiener.com/key
Okay great. That explains the different solutions. The reference solution was calculated with GLPK I think. Pyglpk is not active anymore if I'm not mistaken. However, cobrapy has its own bindings to GLPK so you only need to install libplgk-dev and python and rebuild cobrapy. This will compile and use cobrapy's own bindings.
Just for completeness on Ubuntu 16.04 the recommended mode of installation is to use pip which will use the new manylinux builds which already include all external dependencies.
On Wed, Sep 7, 2016, 09:54 Matthias König notifications@github.com wrote:
I just installed the latest gurobi and mosek.
cobra.solvers.solver_dict Out[2]: {'gurobi': <module 'cobra.solvers.gurobi_solver' from '/usr/local/lib/python2.7/dist-packages/cobra-0.4.2b2.post25-py2.7-linux-x86_64.egg/cobra/solvers/gurobi_solver.pyc'>, 'mosek': <module 'cobra.solvers.mosek' from '/usr/local/lib/python2.7/dist-packages/cobra-0.4.2b2.post25-py2.7-linux-x86_64.egg/cobra/solvers/mosek.pyc'>}
I wanted to try pyglpk first but was unable to get a working pyglpk on Ubuntu 16.04. The basic installation does not work and the import of the solver fails with
/usr/local/lib/python2.7/dist-packages/ply/yacc.pyc in yacc(method, debug, module, tabmodule, start, check_recursion, optimize, write_tables, debugfile, outputdir, debuglog, errorlog, picklefile) 3283 read_signature = lr.read_pickle(picklefile) 3284 else: -> 3285 read_signature = lr.read_table(tabmodule) 3286 if optimize or (read_signature == signature): 3287 try:
/usr/local/lib/python2.7/dist-packages/ply/yacc.pyc in read_table(self, module) 1983 parsetab = sys.modules[module] 1984 -> 1985 if parsetab._tabversion != tabversion: 1986 raise VersionError('yacc table file version is out of date') 1987
AttributeError: 'module' object has no attribute '_tabversion'
I tried to install with
sudo apt-get install python-dev libglpk-dev python-glpk
which worked on Ubuntu 14.04, but does not work on 16.04 any more. So if someone has pyglpk as solver working on Ubuntu 16.04 I would like to know how (without conda or downgrading packages).
M
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/opencobra/cobrapy/issues/277#issuecomment-245306837, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0pDxATeI1NlJ3R9AX5l-ugPSsnU31Eks5qntAzgaJpZM4J2sXO .
Christian Diener <mail@cdiener.com ch.diener@gmail.com>
For encrypted communication you may use the following public key: https://cdiener.com/key
Works now and all tests pass. The cglpk solver is found after installing Cython. Thanks for the help.
Hi all,
I just did a clean install from the git repository. The summary method test fails when running
test_all()
with tabulate (0.7.5) pandas (0.18.1) and I get the following errorIn addition the requirements pandas tabulate should be added to the install instructions. Only after reading through all the warning did I find out that tabulate is needed.
The best Matthias