Page 1 of 1

OpenSim 4.3 and Python3 - SUPERBILD - iPOPT error

Posted: Mon Nov 01, 2021 6:07 am
by dc547
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 310 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 310 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 310 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

Re: OpenSim 4.3 and Python3 - SUPERBILD - iPOPT error

Posted: Mon Nov 01, 2021 8:47 am
by aymanh
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