OpenSim 4.3 and Python3 - SUPERBILD - iPOPT error

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Dario Cazzola
Posts: 44
Joined: Mon Jun 03, 2013 8:08 am

OpenSim 4.3 and Python3 - SUPERBILD - iPOPT error

Post by Dario Cazzola » Mon Nov 01, 2021 6:07 am

Hi All,

I would like to be able to use OpenSim 4.3 in Python 3. I am planning to use Pycharm and create a opensim env via anaconda.

I have initially followed the Scripting with python instructions and make it work:
Screenshot 2021-10-28 at 09.23.04.png
Screenshot 2021-10-28 at 09.23.04.png (99.82 KiB) Viewed 312 times
However the same env would not work in Pycharm:
Screenshot 2021-10-28 at 11.07.47.png
Screenshot 2021-10-28 at 11.07.47.png (181.84 KiB) Viewed 312 times
Therefore i thought that I need to compile opensim from the source code, as the OpenSim GUI distribution was built to use the Python that comes with macOS.

I have followed the instruction to build the SUPERBUILD but I now get an IPOPT related error in Xcode:
Showing All Messages
/Users/dc547/opensim-core-source/dependencies/xcodebuild:1:1: The directory /Users/dc547/opensim-core-dependencies-build/ipopt-prefix/src/ipopt-build does not contain an Xcode project.
It looks like that IPOPT is the only build target that did not succeed.
Screenshot 2021-11-01 at 12.51.37.png
Screenshot 2021-11-01 at 12.51.37.png (140.8 KiB) Viewed 312 times
Apologies if I am doing something silly but I guess my issues is related to the different version of Python i am using (I have also followed this instructions from Ton to make sure I was doing the right thing: viewtopicPhpbb.php?f=91&t=12076&p=34127&start=0&view=).

Many thanks for your help.

Dario

User avatar
Ayman Habib
Posts: 2238
Joined: Fri Apr 01, 2005 12:24 pm

Re: OpenSim 4.3 and Python3 - SUPERBILD - iPOPT error

Post by Ayman Habib » Mon Nov 01, 2021 8:47 am

Hi Dario,

The discussion on the github issue below maybe useful since the published configuration worked but you're trying to create a custom environment
https://github.com/opensim-org/opensim-core/issues/2771

It's possible the issue has to do with how ipopt is compiled and that some flags are not passed along to superbuild. Unfortunately with so many versions/distributions/platforms of python it's a bit hard to keep-track/test all of them. I'd also note that you're trying to create a Debug configuration which may use flags/settings that conflict with those used by the superbuild.

Please let us know what you find out so that we can handle it in the build process and other interested users can benefit.

Thank you,
-Ayman

POST REPLY