Still Problems with "Installation" of CasADi on Windows 7 using Python

427 views
Skip to first unread message

Armin Grieser

unread,
Nov 10, 2015, 7:17:30 AM11/10/15
to CasADi
Dear community,

Despite 3 days of searching this forum, I could not find a solution to my problem (though there are similar topics already).
Sorry if I just didn't find the missing link.

I want to use CasADi with Python(x,y) Version 2.7.9 (also tried with 2.7.10) on Windows 7, 64bit. I am using Spyder(IDE)

I followed the "installation"-instructions on https://github.com/casadi/casadi/wiki/InstallationInstructions
The hyperlink "download page" in the phrase "On our download page, locate and download the binary archive of your choice:", by the way, does not work.
I then cloned the files of version 2.4.1  from "https://github.com/casadi/casadi/tree/master" using Git (HTTP clone URL: https://github.com/casadi/casadi.git).

As I am new to GitHub I am not completely sure if this was the proper way...

Now the problem is, that Python cannot find casadi, giving me the error message:
ImportError: No module named casadi

My code is simply
import sys

sys.path.append("C:\...\CasADi\Git\casadi")

import casadi


...as indicated on the casadi installation site. For my coding I simply used a new file without starting any project in Spyder.


I tried several things I found in this forum. At least for one other troubled user the problem was solved by the update to version 2.4.1 of casadi, sadly not for me.
My casadi folder is outside of the Python folder (as recommended somewhere in the forum)
For me it is also not clear until which subdirectory I have to indicate my path in the sys.path.append("...") command.

To make this and the coding more clear, I added a screenshot.

I participated the 2014 Summer School on NOC in Freiburg where CasAdi was introduced. From there I slightly remember that a (simple) installation of the tool was done. I am wondering if, now, there is no installation necessary at all, respectively, if an installation is still possible?

Every help would be highly appreciated!  Thank you in advance!
cheers


Screenshot_Spyder_and_folder.JPG

Joris Gillis

unread,
Nov 10, 2015, 7:24:56 AM11/10/15
to CasADi
Dear Armin,

It appears to me that you have downloaded the casadi source, while you need the binary.
The hyperlink is actually correct, but we suffer from this weird bug with subdomain forwarding.
Just reload the page when you click the link and get the page-no-found error

Best regards,
  Joris

Armin

unread,
Nov 10, 2015, 7:46:24 AM11/10/15
to CasADi
Hi Joris,

thank you very much for the quick and perfect answer.
The "refresh" was successfull and the new correct download seems to work now.
Thanks a lot for your help and your effort on this excellent project.
Best Armin

Armin

unread,
Nov 10, 2015, 8:06:46 AM11/10/15
to CasADi
Just in case someone gets a similar error:
It also seems to me that the path is not allowed to be too long
If I insert one more level as subfolder, I will get the same error again.
Reply all
Reply to author
Forward
0 new messages