opensim-core icon indicating copy to clipboard operation
opensim-core copied to clipboard

Streamline Python API distributions

Open nickbianco opened this issue 1 year ago • 5 comments

The new Anaconda packages have made distributing the Python interface to the API much simpler. This epic will organize our efforts to make the Python distributions even more streamlined and accessible.

A brief list of the main new features and changes we would like to make:

  • [ ] Only distribute the Python interface via the conda packages (i.e., remove manual install instructions). Users may still install directly via a local build, if they wish.
  • [ ] Create pre-configured conda environments (e.g., via Jupyter notebooks) for all main applications in the OpenSim ecosystem (i.e., OpenCap, AddBiomechanics, Moco, etc). Optionally create a "global" environment that works for all tools.
  • [ ] "Crazy" idea: integrate pre-configured environments/notebooks directly into AddBiomechanics and OpenCap tools to allow analyses directly in the web.
  • [ ] Update the Confluence documentation to reflect all the information above.

nickbianco avatar Aug 23 '23 17:08 nickbianco

@aymanhab, @carmichaelong: feel free to update the list above. I know there's a few things I forgot from our recent discussions.

nickbianco avatar Aug 23 '23 17:08 nickbianco

@nickbianco @carmichaelong @mattpetrucci @AlbertoCasasOrtiz I updated the confluence page to remove some stale instructions and be consistent with 4.5 release if you can take a look/review and give feedback I'd appreciate it. I tried to keep info for 4.2 users but I think docs older versions pre 4.3 were relying extensively on the manual installation and can probably be dropped to avoid confusion). I welcome your thoughts/feedback

aymanhab avatar Dec 14 '23 18:12 aymanhab

@aymanhab taking a look over the changes now. My first thought is that, yes, I think dropping the pre-4.3 instructions makes sense since Python installations have changed a lot since then. I can't think of a good reason why I wouldn't tell someone to upgrade to at least OpenSim 4.3 anyway.

nickbianco avatar Dec 15 '23 16:12 nickbianco

I just left a bunch of comments throughout the Python instructions page, mostly just to lay out my thoughts. @aymanhab I'm happy to help make edits once we decide on what we want.

nickbianco avatar Dec 15 '23 17:12 nickbianco

@aymanhab I tried the Anaconda instructions on my M1 mac (which we expected to fail, and it did). In case it's helpful for documentation (and to double check that this isn't an opensim issue), here are some details:

Used an x64 conda environment, followed instructions. When running python -m pip install ., this was the output:

Processing /Applications/OpenSim 4.4/OpenSim 4.4.app/Contents/Resources/opensim/sdk/Python
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: opensim
  Building wheel for opensim (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      error: could not create 'build': Permission denied
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for opensim
  Running setup.py clean for opensim
Failed to build opensim
ERROR: Could not build wheels for opensim, which is required to install pyproject.toml-based projects

carmichaelong avatar Dec 19 '23 18:12 carmichaelong