umyelab / LabGym

Quantify user-defined behaviors.
GNU General Public License v3.0
64 stars 5 forks source link

Issues installing LabGym on WSL #197

Closed mythhero2 closed 1 month ago

mythhero2 commented 1 month ago

python3 -m pip install LabGym

Then I got the error message as below:

Building wheels for collected packages: wxPython Building wheel for wxPython (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [132 lines of output]

  Error running configure
  ERROR: failed building wxWidgets
  Traceback (most recent call last):
    File "/tmp/pip-install-tagf0dj3/wxpython_992df964324f427e8d8d85fff00957ca/build.py", line 1563, in cmd_build_wx
      wxbuild.main(wxDir(), build_options)
    File "/tmp/pip-install-tagf0dj3/wxpython_992df964324f427e8d8d85fff00957ca/buildtools/build_wxwidgets.py", line 379, in main
      exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
    File "/tmp/pip-install-tagf0dj3/wxpython_992df964324f427e8d8d85fff00957ca/buildtools/build_wxwidgets.py", line 72, in exitIfError
      raise builder.BuildError(msg)
  buildtools.builder.BuildError: Error running configure
  Finished command: build_wx (0m2.945s)
  Finished command: build (0m2.945s)
  Command '"/usr/bin/python3" -u build.py build' failed with exit code 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for wxPython Running setup.py clean for wxPython Failed to build wxPython ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (wxPython)

...everything before this error message seems to be fine... What did I miss?

yujiahu415 commented 1 month ago

Try this:

  1. sudo apt update
  2. apt-get install libgtk-3-dev
  3. python3 -m pip install six
  4. python3 -m pip install --upgrade six setuptools wheel
  5. python3 -m pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython
  6. python3 -m pip install LabGym

And let me know if this solves the issue. Thanks!

mythhero2 commented 1 month ago

LabGym / Detectro2 was successfully installed. Pytorch was set to 2.0.1.

$ LabGym Then now I got below error message..

Traceback (most recent call last): File "/home/mnb/.local/bin/LabGym", line 5, in from LabGym.main import main File "/home/mnb/.local/lib/python3.10/site-packages/LabGym/main.py", line 25, in from LabGym import version,gui_main File "/home/mnb/.local/lib/python3.10/site-packages/LabGym/gui_main.py", line 22, in import wx File "/home/mnb/.local/lib/python3.10/site-packages/wx/init.py", line 17, in from wx.core import File "/home/mnb/.local/lib/python3.10/site-packages/wx/core.py", line 12, in from ._core import ImportError: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

yujiahu415 commented 1 month ago

Try this:

sudo apt-get install git curl libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0

And let me know if this solves the issue. Thanks!

mythhero2 commented 1 month ago

Now it works! Thanks!

yujiahu415 commented 1 month ago

Great! Thanks for letting me know this!