Closed juz4karen closed 4 years ago
Hi.
Did you uninstall your previous version of cplex and did you follow the instructions in https://www.ibm.com/support/knowledgecenter/SSSA5P_12.9.0/ilog.odms.cplex.help/CPLEX/GettingStarted/topics/set_up/Python_setup.html to install the python wrappers for CPLEX 12.9 ?
Hi,
May I know how do I specifically install the previous version of cplex?
And, yes, I did follow the instructions to install the python setup.py . But did not do the setting the environment variable PYTHONPATH. Not quite understand on that.
Could you guide? Thank you so much.
To fix your environment:
$ source /Users/karenchung/miniconda3/bin/activate
$ pip uninstall cplex
$ cd $CPLEX_STUDIO_DIR129/python/3.7/x86-64_osx
$ python setup.py install
If this does not work, please let me know the output for which pip
and which python
, and if you are using command line or IDE.
Hi, when I tried to uninstall cplex, below occurred:
pip uninstall cplex Found existing installation: cplex 12.9.0.0 ERROR: Cannot uninstall 'cplex'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
This means that it has been installed with an older version of pip. Please upgrade your version of pip. In your anaconda3 env:
pip install -U pip
then:
$ cd $CPLEX_STUDIO_DIR129/python/3.7/x86-64_osx
$ pip install --ignore-installed .
(or rm -rf /Users/karenchung/miniconda3/lib/python3.7/site-packages/cplex
before the new install, this works too)
After I did pip install -U pip , it showed
pip install -U pip Requirement already up-to-date: pip in ./miniconda3/lib/python3.7/site-packages (20.1.1)
Next I used command rm -rf /Users/karenchung/miniconda3/lib/python3.7/site-packages/cplex ,
then
cd applications/cplex/cplex/python/3.7/x86-64_osx (base) Karens-MacBook-Air:x86-64_osx karenchung$ python setup.py install
Then tried to carve model again, problem still occurred.
To add on,
which pip /Users/karenchung/miniconda3/bin/pip
which python /Users/karenchung/miniconda3/bin/python
Also, when I cd applications/cplex/cplex/python/3.7/x86-64_osx and insert command pip install --ignore-installed below occurred:
(base) Karens-MacBook-Air:x86-64_osx karenchung$ pip install --ignore-installed ERROR: You must give at least one requirement to install (see "pip help install")
you are missing a dot in the command line .
:
$ pip install --ignore-installed .
Sorry, I tried, problem still occurred. Attached herewith the full output file.
There are much error possibilities in your program, and you don't provide me with enough details. I can only guess, so please provide me the following informations:
You run your program as carve
. What is this ? How this has been created ? is that a shell script ? is that an executable ? If this is a shell script, please share the source on a github project so that I can have a look. If it has been downloaded from the web, please provide a link.
I'd also like to check your cplex version. Can you please run this:
$ /Applications/CPLEX/cplex/bin/x86-64_osx/cplex
This should display something like:
Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.10.0.0 with Simplex, Mixed Integer & Barrier Optimizers 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 Copyright IBM Corp. 1988, 2019. All Rights Reserved.
Please provide me the output of this.
3. Then I need also the value of your $PATH, $LD_LIBRARY_PATH, $DYLD_LIBRARY_PATH and $PYTHON_PATH .
https://github.com/cdanielmachado/carveme_paper https://carveme.readthedocs.io/en/latest/installation.html https://carveme.readthedocs.io/en/latest/usage.html
2. Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer Community Edition 12.9.0.0 with Simplex, Mixed Integer & Barrier Optimizers 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 Copyright IBM Corp. 1988, 2019. All Rights Reserved.
In your cplex output:
Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer **Community Edition 12.9.0.0**
with Simplex, Mixed Integer & Barrier Optimizers
The cplex you have in /Applications/CPLEX/cplex/bin/x86-64_osx/cplex
is a community edition.
It is limited to 1000 variables/ constraints.
This is not the academic version.
Please download and install the academic version from this link: https://www.ibm.com/academic/technology/data-science
So sorry for that I didn't realize this. I'm requesting my supervisor to request for the installation of academic version.
Will come back again to update on this (if that could solve my issue).
I'm so sorry again for the trouble caused. And thank you so much for the time taken!
Hi, I've downloaded another version of cplex.
**$ /Applications/CPLEX_Studio1210/cplex/bin/x86-64_osx/cplex
Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 12.10.0.0 with Simplex, Mixed Integer & Barrier Optimizers 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 Copyright IBM Corp. 1988, 2019. All Rights Reserved.**
I tried to run and the error 1016 still persisted.
The previous community version is still in system.
Community version directory: /Applications/cplex Latest download version directory: /Applications/CPLEX_Studio1210
May I know what should I do next?
I registered as academic initiative to download the academic version and it led me to here (please see attached) and I selected for IBM ILOG CPLEX Optimization Studio V12.10 for OSX Multiplatform Multilingual (CC43DML )
Did you install your new wrappers ?
$ source /Users/karenchung/miniconda3/bin/activate
$ cd /Applications/CPLEX_Studio1210/cplex/python/3.7/x86-64_osx
$ pip install --ignore-installed .
(In case this does not work, please provide full output of those commands and your carve run)
After I installed the new wrappers and run carve, now it pop different error.
TypeError: not a list
Attached herewith full output of command and carve run output. Command & carve output.docx
Now that you got your cplex working, the support for your error should be handled by CPLEX support (which I'm not part of) or community.
You can try on IBM Decision Optimization community https://community.ibm.com/community/user/datascience/communities/community-home/digestviewer?communitykey=ab7de0fd-6f43-47a9-8261-33578a231bb7&tab=digestviewer or on https://or.stackexchange.com/questions/tagged/cplex (people from CPLEX team answer to questions to those forum).
However, note that for CPLEX support to have a look at your issue, you will need to be able to provide either a .lp model file or some python that uses only CPLEX. From what I see in your logs, it is not clear wether the problem is due to CPLEX or CarveMe - I would say the problem is in CarveMe, since you did not have this problem with CPLEX 12.9 - Maybe CarveMe does not support CPLEX 12.10 ? Without a sample using only CPLEX code, I cannot diagnose this.
Thanks
Hi,
Thank you so much for assisting me to solve my previous issue.
Now with this issue, I googled it, read from CarveMe support that it is the CarveMe issue that does not support CPLEX 12.10. The current stable version of CarveMe supports CPLEX 12.7 with Python 3.6.
May I ask again, how could I downgrade the CPLEX to lower version, 12.7 ?
Hi,
Extracted from this page https://community.ibm.com/community/user/datascience/blogs/xavier-nodet1/2020/07/09/cplex-free-for-students :
On the Academic Initiative website, you will find a direct link to download the latest version of CPLEX Optimization Studio. But other versions are available as well. In order to get an older version, please follow these steps:
If you need a very old version of CPLEX Optimization Studio that you can’t find on the Academic Initiative website, please send an email to cos-ai-support@wwpdl.vnet.ibm.com specifying what version you need and for which platform (Windows, Linux, macOS). Please make sure you send any such email from the same address as you used to register in the AI program, and that you explain why you need a version of the software that’s not a more recent one.
Once you have downloaded 12.7 academic, you will need to install it with same commands than above (https://github.com/IBMDecisionOptimization/docplex-examples/issues/26#issuecomment-659223625 ) but of course with your new software location.
I downloaded the Cplex 12.7, however the file is bin file. I can't open it with The Unarchiver. Could you advise?
Hi,
I'm sorry but I'm not familiar with osx distributions for CPLEX. Please contact cos-ai-support@wwpdl.vnet.ibm.com
Thanks
Hi,
Thank you for that, I will contact with the IBM support team.
Thank you so much for your help on the issue!
Hi, I'm facing this issue when I tried to carve model with CarveMe, it showed error saying that
CPLEX Error 1016: Community Edition. Problem size limits exceeded. Purchase at https://ibm.co/2s0wqSa.
Fyi, I downloaded the IBM ILOG CPLEX Optimization Studio V12.9.0 academic version from the IBM website. I'm using MacOS. Please help me with this issue. Thank you so much.
Full error message as below:
Reported 65972 pairwise alignments, 65974 HSPs. 2585 queries aligned. Traceback (most recent call last): File "/Users/karenchung/miniconda3/bin/carve", line 364, in
ref_score=args.reference_score
File "/Users/karenchung/miniconda3/bin/carve", line 210, in main
debug_output=debug_output)
File "/Users/karenchung/miniconda3/lib/python3.7/site-packages/carveme/reconstruction/carving.py", line 236, in carve_model
ref_reactions=ref_reactions, ref_score=ref_score, debug_output=debug_output)
File "/Users/karenchung/miniconda3/lib/python3.7/site-packages/carveme/reconstruction/carving.py", line 184, in minmax_reduction
solution = solver.solve()
File "/Users/karenchung/miniconda3/lib/python3.7/site-packages/framed/solvers/cplex_interface.py", line 308, in solve
problem.solve()
File "/Users/karenchung/miniconda3/lib/python3.7/site-packages/cplex/init.py", line 1225, in solve
_proc.mipopt(self._env._e, self._lp)
File "/Users/karenchung/miniconda3/lib/python3.7/site-packages/cplex/_internal/_procedural.py", line 760, in mipopt
check_status(env, status)
File "/Users/karenchung/miniconda3/lib/python3.7/site-packages/cplex/_internal/_procedural.py", line 303, in call
raise CplexSolverError(error_string, env, status)
cplex.exceptions.errors.CplexSolverError: CPLEX Error 1016: Community Edition. Problem size limits exceeded. Purchase at https://ibm.co/2s0wqSa.