Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda package can't find (or doesn't include) opensim-cmd executable #29

Closed
nickbianco opened this issue Mar 16, 2023 · 21 comments
Closed

Comments

@nickbianco
Copy link
Member

Platform: Ubuntu 22.04 (through Windows Subsystem for Linux)
Python version: 3.9
Numpy: 1.20.2

I installed the conda package into my conda environment, and while import opensim loads fine inside a Python interpreter, the opensim-cmd command line tool is notfound. I searched the Anaconda directories and found the OpenSim headers, include files, and Python modules but no opensim-cmd executable or any \bin folder associated with the OpenSim package.

@aymanhab
Copy link
Member

@nickbianco I created a conda package on opensim_admin channel
opensim-4.4-py38np120.tar.bz2
According to 7zip it contains the exe's we need but it's not clear where it ends in an actual conda environment. Can you give that a spin? Thank you. You may have to download and install from file in case conda doesn't resolve to this package based on other dependencies. I didn't build all variants pending your feedback.

@nickbianco
Copy link
Member Author

Great, I'll give it a shot! Do you have a Python 3.9 build? I could test the change directly in my AddBiomechanics environment which needs the opensim-cmd executable.

@nickbianco
Copy link
Member Author

Oh, wait. I can just pull down whatever I need from opensim_admin, I think?

@aymanhab
Copy link
Member

aymanhab commented Mar 17, 2023 via email

@nickbianco
Copy link
Member Author

Okay, sounds good. I'll give the py38 version a try now.

@nickbianco
Copy link
Member Author

nickbianco commented Mar 17, 2023

Looks like it worked! The opensim-cmd executable appears under <anaconda_folder>envs\<env_name>\Library\bin.

I had to install the package using the tar file you posted, installing from the opensim_admin channel failed on Ubuntu. But it seems like that's because the build you created was for Windows (i.e., the executables all have .exe extensions)?

@aymanhab
Copy link
Member

Perfect, I'm building 3.7, 3.8 and 3.9 and will upload later today. We'll do the remaining platforms on ci if possible.

@aymanhab
Copy link
Member

Windows 3.9 package is now up if still needed, while the others are still building. All packages will be on the opensim_admin channel before moving to the public opensim-org channel.

@nickbianco
Copy link
Member Author

I'll need the Linux package for my workflow. Once that's done building I can test it out.

@aymanhab
Copy link
Member

@nickbianco I'm having problems building on linux because of an internal compiler error building Moco Examples, are you familiar with this? or can we disable building these examples by setting flags in CMake since we're not building Moco anyway for this package? Thank you

#23 3372.2 [ 84%] Building CXX object OpenSim/Examples/Moco/exampleHangingMuscle/CMakeFiles/exampleHangingMuscle.dir/exampleHangingMuscle.cpp.o
#23 3445.6 x86_64-conda-linux-gnu-c++: internal compiler error: Killed (program cc1plus)
#23 3445.6 Please submit a full bug report,
#23 3445.6 with preprocessed source if appropriate.
#23 3445.6 See https://gcc.gnu.org/bugs/ for instructions.
#23 3445.6 make[2]: *** [OpenSim/Examples/Moco/example2DWalking/CMakeFiles/example2DWalking.dir/build.make:76: OpenSim/Examples/Moco/example2DWalking/CMakeFiles/example2DWalking.dir/example2DWalking.cpp.o] Error 4
#23 3445.6 make[2]: *** Deleting file 'OpenSim/Examples/Moco/example2DWalking/CMakeFiles/example2DWalking.dir/example2DWalking.cpp.o'
#23 3445.6 make[1]: *** [CMakeFiles/Makefile2:1292: OpenSim/Examples/Moco/example2DWalking/CMakeFiles/example2DWalking.dir/all] Error 2
#23 3445.6 make[1]: *** Waiting for unfinished jobs....
#23 3473.0 make: *** [Makefile:146: all] Error 2

@aymanhab
Copy link
Member

@AlbertoCasasOrtiz Thanks for the docker container, it worked great, I'm using it to build a variant that includes the utilities but running into the issue above, have you seen this during testing the container? Thank you

@nickbianco
Copy link
Member Author

I haven't seen this error, but it could be that the Docker container is running out of memory. If simply increasing the memory doesn't work, then yes, let's just disable building the examples until we plan to include the Moco libraries.

@aymanhab
Copy link
Member

ok, give it a try when you have a chance, both 3.7, 3.8, 3.9 pkgs for llinux are now on the opensim_admin channel.

@nickbianco
Copy link
Member Author

That worked! The exectuable appears and works as expected when I activate the conda environment it is in.

@AlbertoCasasOrtiz
Copy link
Collaborator

@aymanhab As @nickbianco said, the error:

3445.6 x86_64-conda-linux-gnu-c++: internal compiler error: Killed (program cc1plus)

Normally appears when the docker container is out of memory. Another way of bypassing it is by decreasing the number of jobs in the script.

@aymanhab
Copy link
Member

Thanks @AlbertoCasasOrtiz I already did that and eliminated unnecessary build options and got a package posted on dockerhub with python 3.7, 3.8, 3.9. I posted on opensim_admin channel to get some testing before posting to opensim-org channel. If you can test the notebooks you have or the opencap-core side then we can upload to the public package with some confidence.

@AlbertoCasasOrtiz
Copy link
Collaborator

Perfect, I am going to test the notebooks with the opensim_admin channel. I'll let you know once I have tested them.

@AlbertoCasasOrtiz
Copy link
Collaborator

@aymanhab It is still downloading the package for Python 3.8, so it is crashing when trying to import opensim. However, it works if you install it specifying the python version:

conda install -c opensim_admin opensim=4.4=py39np120

@nickbianco
Copy link
Member Author

@aymanhab: need to update Mac builds.

@nickbianco
Copy link
Member Author

@aymanhab have the Mac builds been updated?

@aymanhab
Copy link
Member

Not yet, the build keeps failing for various random reasons, trying again today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants