Closed franciscozorrilla closed 6 years ago
Installing CPLEX is a bit complicated, here's how I got it done.
I would recommend creating a "CARVEME" environment and doing as follows (in ubuntu):
`#create virtual environment with anaconda & activate it
$ conda create -n carve-environment
$ conda activate carve-environmetn
### INSTALL THE FOLLOWING inside this environment
#carveme
pip install carveme
#diamond
````````
wget http://github.com/bbuchfink/diamond/releases/download/v0.9.22/diamond-linux64.tar.gz
tar xzf diamond-linux64.tar.gz
#cplex installation---download the file from IBM (must first get a free lincese from IBM)
`````````````````````````````````````````````````````````````````````````````````````````
~create "./anaconda3/opt/" folder
$ bash cplex_studio128.linux-x86-64.bin
~when prompted by the installer use the following installation path
/home/username/anaconda3/opt/ibm/ILOG/CPLEX_Studio128
#python CPLEX api set-up
````````````````````````
~go to the following folder within this environment:
cd ~/anaconda3/opt/ibm/ILOG/CPLEX_Studio128/cplex/python/3.6/x86-64_linux
--pay attention here----- python_version_to_use-^ ^-your_comps_architecture
#execute the following from within that folder^
python setup.py install`
@francisco It seems you installed the promotional version of cplex which cannot handle large problems. You need to install the full version.
@rdmtinez you can do it without a dedicated environment, but I would also recommend doing everything inside a conda environment.
Got it to work! thanks for the quick response @cdanielmachado @rdmtinez
Could you give me the steps to install CPLEX on a mac? I tried registering on the IBM website but I was only able to download the desktop version of CPLEX optimizer. Not sure if this is the one needed. Also, I wasn't able to set up the Python API as well.
Hello, could someone confirm that carveme is working with cplex academic version (I am not sure if "academic" means full version, it seems impossible to find this any cplex documentation) on a mac (python 3.8)? I have tried all solutions already posted, but I keep getting "cplex.exceptions.errors.CplexSolverError: CPLEX Error 1016: Community Edition. Problem size limits exceeded". Thank you so much in advance
Answered here: https://github.com/cdanielmachado/carveme/issues/113
Hello,
When I try running "carve my.faa" I get the following:
Traceback (most recent call last): File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/bin/carve", line 343, in
hard=args.hard
File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/bin/carve", line 183, in main
debug_output=debug_output)
File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/lib/python3.6/site-packages/carveme/reconstruction/carving.py", line 227, in carve_model
debug_output=debug_output)
File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/lib/python3.6/site-packages/carveme/reconstruction/carving.py", line 171, in minmax_reduction
solution = solver.solve()
File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/lib/python3.6/site-packages/framed/solvers/cplex_interface.py", line 308, in solve
problem.solve()
File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/lib/python3.6/site-packages/cplex/init.py", line 1099, in solve
_proc.mipopt(self._env._e, self._lp)
File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/lib/python3.6/site-packages/cplex/_internal/_procedural.py", line 629, in mipopt
check_status(env, status)
File "/c3se/users/zorrilla/Hebbe/.conda/envs/snakemake_env/lib/python3.6/site-packages/cplex/_internal/_procedural.py", line 303, in call
raise CplexSolverError(error_string, env, status)
cplex.exceptions.errors.CplexSolverError: CPLEX Error 1016: Promotional version. Problem size limits exceeded.
From what I can tell, it looks like maybe I have not installed cplex properly? I tried using both pip and conda, but I get the same error messages telling me that I have a promotional version. I followed the installation instructions on the readthedocs page, and the IBM page it references. However, I cannot find the "setup.py" file, nor the path required to set PYTHONPATH in order to set up the python API, because I am working on a server/cluster. Any advice on how I can fix this issue?
Regards, Francisco