I'm attempting to install OpenSim 3.3, in order to use it with Python (2.7 or 3.6), on a Red Hat Enterprise Linux (7) operating system, with the terminal. That Linux OS already has Python (Anaconda), python-setuptools, wheel, pip, simbody, and cmake installed. However, upon following OpenSim instructions for building OpenSim from source (as is necessary for Linux) with Python wrapping, the OpenSim installation folder doesn't contain a <OPENSIM_HOME>/lib/python2.7/site-packages/ folder, or a <OPENSIM_HOME>/lib folder. That folder is used in the instructions for setting up OpenSim Linux Python scripting <https://simtk-confluence.stanford.edu/d ... hon-Ubuntu>.
However, I set up OpenSim Python scripting previously on another operating system, and remembered that the command
Code: Select all
python setup.py install
Code: Select all
python setup.py install
In other words, I don't know how to proceed from here in installing OpenSim Python scripting in Linux 7. What did I do wrong, and what should I do?
My specific process:
Building OpenSim from source for Linux following instructions <https://simtk-confluence.stanford.edu/d ... ux+Support>
<https://simtk.org/frs/?group_id=91> Opensim Source code > Download package
unzip package in /root/Downloads
unzip 2 things in package in /root/Downloads
Code: Select all
mkdir /root/Documents/build
# install cmake and ccmake
yum search cmake
yum install cmake.x86_64
# install simbody (with conda installed)
conda install -c conda-forge simbody
cd /root/Documents/build
ccmake ~/Downloads/OpenSim33-source/
In the GUI,
I set
BUILD_PYTHON_WRAPPING:BOOL=ON
Left alone:
BUILD_BINARY_DIR=/root/Documents/build
Simbody_HOME=
Simbody_DIR=/root/home/USERNAME/anaconda3/lib/cmake/simbody
Simbody_LIBRARIES=/root/home/USERNAME/anaconda/lib/libSimTKsimbody.so;/root/home/USERNAME/anaconda3/lib/libSimTKmath.so;/root/home/USERNAME/anaconda3/lib/libSimTKcommon.so;/root/USERNAME/anaconda3/lib/libopenblas.so;pthread;rt;dl;m
Simbody_STATIC_LIBRARIES=Simbody_STATIC_LIBRARIES-NOTFOUND
Configured, doesn't throw error
Generated, doesn't throw error
Code: Select all
# in /root/Documents/build
make # doesn't throw error
make test # doesn't throw error
make install # doesn't throw error
Code: Select all
# ensure I have python-setuptools
python
>> import setuptools # doesn't throw error
>> exit()
# runs into error described in first paragraphs of post
Code: Select all
python
>> import opensim
>> m = opensim.Model()
3 OpenSim python-related places = see screenshot 3openSimPythonRelated.png; the first command was
Code: Select all
ls
Code: Select all
export OPENSIM_HOME=/root/Documents/build/OpenSim
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPENSIM_HOME
PYTHONPATH=$PYTHONPATH:/root/Documents/build/OpenSim/Wrapping/Python
Code: Select all
which python
/root/home/USERNAME/anaconda3/bin/python
python --version
Python 3.6.3 :: Anaconda custom (64-bit)
echo $PATH
/root/home/USERNAME/anaconda3/bin:/root/home/USERNAME/anaconda3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin
echo $PYTHONPATH
/root/Documents/build/OpenSim/Wrapping/Python