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

python pip install of mayavi in a docker error (ubtuntu 20.04) #1323

Closed
PatrickPromitzer opened this issue Nov 26, 2024 · 5 comments
Closed

Comments

@PatrickPromitzer
Copy link

Installing mayavi in a docker stopped working.
We are using a GitLab runner to test our repository, and the test Failed today

Last working date: 2024.11.13
Last test date: 2024.11.26

Docker container

docker run -it ubuntu:20.04

Tested with python3.8

apt update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata

apt install qt5-default python3-pip -y
python3.8 -m pip install --upgrade pip setuptools wheel
python3.8 -m pip install pyqt5 --config-settings --confirm-license= --verbose
python3.8 -m pip install vtk
python3.8 -m pip install mayavi

Tested with python virtualenv python3.8

apt update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
apt install qt5-default python3-pip -y

cd /tmp
pip install virtualenv
virtualenv venv
venv/bin/python -m pip install --upgrade pip setuptools wheel
venv/bin/python -m pip install pyqt5 --config-settings --confirm-license= --verbose
venv/bin/python -m pip install vtk
venv/bin/python -m pip install mayavi

I tried an earlier version

venv/bin/python -m pip install vtk==9.0.1
venv/bin/python -m pip install mayavi==4.8.1
@harrandt
Copy link

Did you see the error message?
Possible duplicate of #1324

@PatrickPromitzer
Copy link
Author

Now you have to install a lower PyQt5-sip version to be able to install "pyqt5" for python 3.8

python3.8 -m pip install PyQt5-sip==12.15.0

It looks like the same error, or at least very similar.
All 3 issues are probably the same one

I guess, it is easier to test in a docker.

Error output

Building wheels for collected packages: mayavi
  Building wheel for mayavi (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for mayavi (pyproject.toml) did not run successfully.
  │ exit code: -11
  ╰─> [41 lines of output]
      running bdist_wheel
      running build
      running build_py
      Building tvtk_classes.zip
      ----------------------------------------------------------------------
      Building TVTK classes... Fatal Python error: Segmentation fault
      
      Current thread 0x00007c219dc50740 (most recent call first):
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/vtk_parser.py", line 713 in _find_get_set_methods
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/vtk_parser.py", line 491 in _organize_methods
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/vtk_parser.py", line 157 in parse
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/wrapper_gen.py", line 337 in _gen_methods
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/wrapper_gen.py", line 238 in generate_code
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/code_gen.py", line 235 in _write_wrapper_class
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/code_gen.py", line 142 in generate_code
        File "/tmp/pip-install-fla040xj/mayavi_2ed4b5057d8b4be3a08ee9987e4fb842/tvtk/_setup.py", line 58 in gen_tvtk_classes_zip
        File "<string>", line 247 in build_tvtk_classes_zip
        File "<string>", line 254 in run
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 999 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135 in run
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 999 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/command/bdist_wheel.py", line 410 in run
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 973 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 999 in run_command
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 954 in run_commands
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 199 in run_commands
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 183 in setup
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 117 in setup
        File "<string>", line 322 in <module>
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 319 in run_setup
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 521 in run_setup
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 406 in _build_with_temp_dir
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 425 in _build
        File "/tmp/pip-build-env-xk3p_p8m/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 437 in build_wheel
        File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251 in build_wheel
        File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335 in main
        File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353 in <module>
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mayavi
Failed to build mayavi
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mayavi)

@harrandt
Copy link

harrandt commented Dec 12, 2024

Possible workaround:

#1325 (comment)

@PatrickPromitzer
Copy link
Author

It looks like that workaround works.
Thank you.

@harrandt
Copy link

harrandt commented Dec 12, 2024

Well, a workaround is not a fix ;)
This will pop up again at some point.
Maybe the requirements should be frozen in pyproject.toml - build-system - requires
So you could leave the ticket open ;)

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

2 participants