Problem in installing OpenSim python package

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
William A
Posts: 21
Joined: Thu Feb 16, 2017 10:02 am

Problem in installing OpenSim python package

Post by William A » Mon Sep 24, 2018 6:19 am

Dear All,

I have installed recent OpenSim 4.0 version (OpenSim-40Beta-2018-08-27-win64.exe). Now, I am trying to install OpenSim python package using Anaconda prompt. For that, I have followed the steps for Windows 64 given here: https://simtk-confluence.stanford.edu/d ... nvironment

After running command "python setup.py install", I am getting following error:

Code: Select all

running install
running bdist_egg
running egg_info
writing top-level names to opensim.egg-info\top_level.txt
writing opensim.egg-info\PKG-INFO
writing dependency_links to opensim.egg-info\dependency_links.txt
reading manifest file 'opensim.egg-info\SOURCES.txt'
writing manifest file 'opensim.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying opensim.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying opensim.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying opensim.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying opensim.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt
zip_safe flag not set; analyzing archive contents...
Traceback (most recent call last):
  File "setup.py", line 31, in <module>
    'Topic :: Scientific/Engineering :: Physics',
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\site-packages\setuptools\__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\site-packages\setuptools\command\bdist_egg.py", line 220, in run
    os.path.join(archive_root, 'EGG-INFO'), self.zip_safe()
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\site-packages\setuptools\command\bdist_egg.py", line 273, in zip_safe
    return analyze_egg(self.bdist_dir, self.stubs)
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\site-packages\setuptools\command\bdist_egg.py", line 383, in analyze_egg
    safe = scan_module(egg_dir, base, name, stubs) and safe
  File "C:\Users\Desktop\Anaconda3\envs\william\lib\site-packages\setuptools\command\bdist_egg.py", line 422, in scan_module
    code = marshal.load(f)
ValueError: bad marshal data (unknown type code)

Also, I want to emphasize that, I was able to do the python installation with the previous version of OpenSim 4.0 Beta (OpenSim-4.0.Beta_032718-win64), which was uploaded in March, I guess. But the recent version of 4.0 (OpenSim-40Beta-2018-08-27-win64.exe) is giving the above error. Something has changed in the recent version. Can anyone help to rectify this error?

Thanks,
William

Tags:

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Problem in installing OpenSim python package

Post by Christopher Dembia » Sun Sep 30, 2018 12:54 am

Can you try using python from python.org (instead of Anaconda Python)?

User avatar
Marcos Alfredo Núñez
Posts: 22
Joined: Thu Sep 01, 2016 1:41 pm

Re: Problem in installing OpenSim python package

Post by Marcos Alfredo Núñez » Thu Oct 04, 2018 4:40 am

Looks like you're using Anaconda3 with python3. I believe the python bindings for windows still come for python2.

https://github.com/opensim-org/opensim-gui/issues/886

User avatar
William A
Posts: 21
Joined: Thu Feb 16, 2017 10:02 am

Re: Problem in installing OpenSim python package

Post by William A » Tue Oct 09, 2018 4:29 am

chrisdembia wrote:
Sun Sep 30, 2018 12:54 am
Can you try using python from python.org (instead of Anaconda Python)?
Yes, I have tried with python from python.org too. It is giving the same error.

User avatar
William A
Posts: 21
Joined: Thu Feb 16, 2017 10:02 am

Re: Problem in installing OpenSim python package

Post by William A » Tue Oct 09, 2018 4:32 am

manunez wrote:
Thu Oct 04, 2018 4:40 am
Looks like you're using Anaconda3 with python3. I believe the python bindings for windows still come for python2.

https://github.com/opensim-org/opensim-gui/issues/886
Previous version of OpenSim 4.0 Beta worked with python 3.5 using anaconda3 in windows. So, this version should also work. Anyhow, I have tried with python 2.7. It still gives the same error.

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Problem in installing OpenSim python package

Post by Christopher Dembia » Wed Oct 10, 2018 10:57 am

To my knowledge, we never distributed binaries for OpenSim 4.0 using Python 3.

This Stackoverflow page suggests deleting *.pyc files: https://stackoverflow.com/questions/308 ... rshal-data

User avatar
William A
Posts: 21
Joined: Thu Feb 16, 2017 10:02 am

Re: Problem in installing OpenSim python package

Post by William A » Thu Oct 11, 2018 5:59 am

chrisdembia wrote:
Wed Oct 10, 2018 10:57 am
To my knowledge, we never distributed binaries for OpenSim 4.0 using Python 3.
I have that old OpenSim 4.0 setup file named as "OpenSim-4.0.Beta_032718-win64.exe" which works fine with python 3.5, but I am not able to attach here (file size is around 200 MB). Is there any way I can share it with you? So that you can have a look at what has changed in the new setup. Can missing a file be a possiblity?

Thanks,
William

User avatar
Marcos Alfredo Núñez
Posts: 22
Joined: Thu Sep 01, 2016 1:41 pm

Re: Problem in installing OpenSim python package

Post by Marcos Alfredo Núñez » Fri Oct 19, 2018 6:23 am

Bump. I'm trying to migrate everything to python 3 in the windows machine, OpenSIM is now the only blocker. Would you consider building the next beta releases with python 3 setup as a default, or a setup.py compatible with both python 2 and 3?

User avatar
Thorben Pauli
Posts: 1
Joined: Tue Aug 21, 2018 8:26 pm

Re: Problem in installing OpenSim python package

Post by Thorben Pauli » Thu Oct 25, 2018 7:37 pm

Bump. I had the same issues today, tried OpenSim-40Beta-2018-08-27-win64.exe with python 2.7.15 via Anaconda.

EDIT: Solved!
For some reason I haven't read all previous posts properly, and missed the advice to clean up *.pyc files. That did it for me!

User avatar
Christopher Dembia
Posts: 506
Joined: Fri Oct 12, 2012 4:09 pm

Re: Problem in installing OpenSim python package

Post by Christopher Dembia » Mon Oct 29, 2018 10:56 am

Yay! Thanks for sharing your success, Thorben.

We are hoping to distribute the OpenSim python package directly through conda-forge in the future, but there is no timeline for this change.

POST REPLY