invesalius/invesalius3

Cannot install on Ubuntu 22.04

Kaushik-Iyer-skima opened this issue · 5 comments

When I run sudo apt install invesalius, as per the documentation, this is what shows up:

image

I am running Ubuntu 22.04

And when I try to install from source code, while performing pip install of requirements.txt on my virtual environment, this is what I get:
image

      import sys
      
      cimport cython.object
              ^
      ------------------------------------------------------------
      
      wx/svg/_nanosvg.pyx:45:8: 'cython.object' is not a valid cython.* module
      Traceback (most recent call last):
        File "/tmp/pip-install-40illiu4/wxpython_20e41435cfe4403aaf7bd8693ea02bb8/setup-wxsvg.py", line 54, in <module>
          modules = cythonize([module],
        File "/home/kaushik/invesalius3/venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
          cythonize_one(*args)
        File "/home/kaushik/invesalius3/venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: wx/svg/_nanosvg.pyx
      Command '/home/kaushik/invesalius3/venv/bin/python3 setup-wxsvg.py build_ext --inplace' failed with exit code 1.
      Finished command: build_others (0.713s)
      Finished command: build_py (0m10.791s)
      Finished command: build (0m20.119s)
      Command '"/home/kaushik/invesalius3/venv/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: legacy-install-failure

× Encountered error while trying to install package.
╰─> wxPython

note: This is an issue with the package mentioned above, not pip.

Hi @Kaushik-Iyer-skima ,
Download the wxpython wheel from : https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/
then install directly like for example : pip install /home/wheels/wxPython-4.2.0-cp310-cp310-linux_x86_64.whl

For me this wheel version works in ubuntu 22.04

@sotodela Thank you, your method works. Maybe this should be mentioned in the documentation as a side note I feel. I'm ready to make that change if needed, as I am also trying for GSoC 2024 here @tfmoraes

after installing wxpython wheel InVesalius can be launch on ubuntu 22.04