opensim-core
opensim-core copied to clipboard
Possibly outdated confluence documentation for setting up Python scripting
Hi,
I am setting up scripting in Python (Ubuntu) as described in this confluence page. I have built OpenSim successfully but I am having some issues following the instructions since it appears to me that the folder structure is now different. For example, one of the steps instructs to navigate to a folder I cannot find anywhere in the directories that were created by the opensim-core-linux-build-script.sh
script (such as cd <OPENSIM_INSTALL_DIR>/lib/python3.7/site-packages
). Also other steps appear to have changed.
Is this possible?
Thank you and have a nice day, Italo
@itbellix Indeed it's possible and very likely that the instructions for installation from source are outdated, we strongly recommend end users switch to conda environment where the package is self contained and there's support for a variety of platforms and python versions, however if you need to stay on the cutting edge and use your own build you'll have to do the manual wiring step which is more error-prone. Please let us know where you found the outdated docs so we can update them.
The build script that you pointed to, tests the python packaging in non-conda environment so you can refer to that, note however that you'll need to manually install the build artifact into your own python environment (different for different users/setup). This is not done by the build script.
Hope this helps
Hi @aymanhab, thank you for your answer. Indeed, I am planning to use my own build, and I managed for now to install OpenSim and configure scripting with Python without using the conda environment.
What caused me some troubles is that the instructions reported here on how to configure scripting with Python in Ubuntu did not correspond to the result of building OpenSim on my machine. Here a list of mismatches, hoping that this can be useful to you:
- The instruction say to run
sudo apt-get install python-setuptools
in a terminal. This is alright and worked for me - Then the instructions say that one should navigate to "sdk/python folder in your OpenSim installation. Assuming that OpenSim is installed into directory OPENSIM_INSTALL_DIR, perform the following: ... ". In my case, it was not very clear where the OpenSim installation is, as the build produces automatically a
opensim-core
andopensim-workspace
folders. Maybe it would be helpful to list the instructions for the default situation, where thesetup.py
appears to be (in my case) located atopensim-core/sdk/Python
. The current instructions mention alib/python3.7/site-packages
directory that I could not find anywhere, and this is a bit confusing. - Lastly, it is necessary to add the OpenSim libraries to the
LD_LIBRARY_PATH
. Here I feel that something changed too, since there I could not find a<OPENSIM_INSTALL_DIR>/lib
folder, rather I ended up adding the libraries with these two commands (that I copied in mybashrc
as well):-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/opensim-core/sdk/lib
-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/opensim-workspace/opensim-core-dependencies-install/simbody/lib
For now they appear to be sufficient, but I am not sure if I should add to the library path all thelib
folders found in the various folders underopensim-core-dependencies-install
-
I hope that this explanation is clear enough, let me know if it makes sense to you.
Thank you again!