Hello,

I got the same error and try to find the why.

What I have done:
Install CPLEX and test it works (version 12.6)
Install  SAGE and test it works
Build  CPLEX python interface using SAGE Python
Make symbolic links for libcplex.a, cplex.h and cpxconst.a



*ln -s ./CPLEX_Studio126/cplex/lib/x86-64_linux/static_pic/libcplex.a  
/home/xnnguyen/SAGE/sage-6.1.1-x86_64-Linux/local/lib/libcplex.aln -s  
./CPLEX_Studio126/cplex/include/ilcplex/cplex.h 
/home/xnnguyen/SAGE/sage-6.1.1-x86_64-Linux/local/include/cplex.hln -s 
./CPLEX_Studio126/cplex/include/ilcplex/cpxconst.h 
/home/xnnguyen/SAGE/sage-6.1.1-x86_64-Linux/local/include/cpxconst.h*

Rebuild

*touch ~/SAGE/sage-6.1.1-x86_64-Linux/src/sage/numerical/mip.pyx 
~/SAGE/sage-6.1.1-x86_64-Linux/src/sage/numerical/backends/glpk_backend.pyx 
~/SAGE/sage-6.1.1-x86_64-Linux/src/sage/numerical/backends/cplex_backend.pyx*
*sage -b* (i also tried *sage -ba*)

However, I still got this error:








*Traceback (most recent call last):  File "officer.py", line 129, in 
<module>    p = MixedIntegerLinearProgram(solver="CPLEX", 
maximization=True)   File "mip.pyx", line 328, in 
sage.numerical.mip.MixedIntegerLinearProgram.__init__ 
(sage/numerical/mip.c:1774)  File "generic_backend.pyx", line 956, in 
sage.numerical.backends.generic_backend.get_solver 
(sage/numerical/backends/generic_backend.c:7614)  File 
"generic_backend.pyx", line 1019, in 
sage.numerical.backends.generic_backend.get_solver 
(sage/numerical/backends/generic_backend.c:7365)ImportError: No module 
named cplex_backend*
Do you have any suggestions ?

Thanks.

NGUYEN Xuan Nam









On Friday, February 10, 2012 2:38:24 AM UTC+1, yannche wrote:
>
> Hi Everyone, 
>
> I find SAGE absolutely awesome, and I use it on a daily basis. 
> I am desperately trying to have CPLEX work on SAGE 4.8. I have 
> installed CPLEX 12.3 on my Mac OS 10.6 (Intel CPU). CPLEX works fine 
> as a standalone. However, 
>
> I followed the installation procedure detailed here 
> http://www.sagemath.org/doc/thematic_tutorials/linear_programming.html 
> everything went ok during the installation, I had no error message. 
>
> But then, on SAGE, when I type 
> lp = MixedIntegerLinearProgram(solver="CPLEX") 
>
> I get the following errors. Any clue ? 
> Traceback (most recent call last): 
>   File "<stdin>", line 1, in <module> 
>   File "_sage_input_3.py", line 10, in <module> 
>     exec compile(u'open("___code___.py","w").write("# -*- coding: 
> utf-8 -*-\\n" + 
> _support_.preparse_worksheet_cell(base64.b64decode("bHAgPSBNaXhlZEludGVnZXJMaW5lYXJQcm9ncmFtKHNvbHZlcj0iQ1BMRVgiKQ=="),globals())
>  
>
> +"\\n"); execfile(os.path.abspath("___code___.py")) 
>   File "", line 1, in <module> 
>
>   File "/private/var/folders/4r/km32m_0s09d58glt8bk9bpcr0000gn/T/ 
> tmpJgGWMi/___code___.py", line 2, in <module> 
>     exec compile(u'lp = MixedIntegerLinearProgram(solver="CPLEX") 
>   File "", line 1, in <module> 
>
>   File "mip.pyx", line 200, in 
> sage.numerical.mip.MixedIntegerLinearProgram.__init__ (sage/numerical/ 
> mip.c:1360) 
>   File "generic_backend.pyx", line 864, in 
> sage.numerical.backends.generic_backend.get_solver (sage/numerical/ 
> backends/generic_backend.c:5952) 
>   File "generic_backend.pyx", line 922, in 
> sage.numerical.backends.generic_backend.get_solver (sage/numerical/ 
> backends/generic_backend.c:5768) 
> ImportError: No module named cplex_backend 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to