Когда я пытаюсь установить mayavi нормально с
pip3 install mayavi
, выдает ошибку
ERRROR: Failed building wheel for mayavi
и не устанавливает. Странно, если я создаю виртуальную среду с
python3 -m venv venv
, попадаю в virtualenv, затем устанавливаю pip3, никаких ошибок не возникает, и все работает отлично. Я думаю, что это некоторая проблема с настройкой колеса, работающей с vtk, но я не знаю достаточно об этом, чтобы выяснить, почему проблема вызвана. Если бы я мог получить помощь о том, как приступить к выяснению причины проблемы, это было бы замечательно. Я разместил полную ошибку для справки ниже. Если кто-то спрашивает, почему я не просто использую venv, я хочу, чтобы вся среда работала в док-контейнере без venv.
rob@taqueria:/# pip3 install mayavi
Collecting mayavi
Using cached https://files.pythonhosted.org/packages/08/ea/eb808cb4df8f92bc4d9f9a1ef14566b9b5d60370e6ecbaf9061cdae335fa/mayavi-4.7.1.tar.bz2
Requirement already satisfied: apptools in /usr/local/lib/python3.6/dist-packages (from mayavi) (4.5.0)
Requirement already satisfied: envisage in /usr/local/lib/python3.6/dist-packages (from mayavi) (4.8.0)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from mayavi) (1.17.3)
Requirement already satisfied: pyface>=6.1.1 in /usr/local/lib/python3.6/dist-packages (from mayavi) (6.1.2)
Requirement already satisfied: pygments in /usr/local/lib/python3.6/dist-packages (from mayavi) (2.4.2)
Requirement already satisfied: traits>=4.6.0 in /usr/local/lib/python3.6/dist-packages (from mayavi) (5.1.2)
Requirement already satisfied: traitsui>=6.0.0 in /usr/local/lib/python3.6/dist-packages (from mayavi) (6.1.3)
Requirement already satisfied: vtk in /usr/local/lib/python3.6/dist-packages (from mayavi) (8.1.2)
Requirement already satisfied: configobj in /usr/local/lib/python3.6/dist-packages (from apptools->mayavi) (5.0.6)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from apptools->mayavi) (1.11.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from envisage->mayavi) (39.0.1)
Building wheels for collected packages: mayavi
Building wheel for mayavi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-855msxfa/mayavi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-855msxfa/mayavi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-w7bpqedu --python-tag cp36
cwd: /tmp/pip-install-855msxfa/mayavi/
Complete output (44 lines):
running bdist_wheel
running build
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/vtk/vtkOpenGLKit.py", line 5, in <module>
from .vtkOpenGLKitPython import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-855msxfa/mayavi/setup.py", line 474, in <module>
**config
File "/usr/local/lib/python3.6/dist-packages/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/dist-packages/wheel/bdist_wheel.py", line 192, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-855msxfa/mayavi/setup.py", line 268, in run
build_tvtk_classes_zip()
File "/tmp/pip-install-855msxfa/mayavi/setup.py", line 254, in build_tvtk_classes_zip
gen_tvtk_classes_zip()
File "tvtk/setup.py", line 83, in gen_tvtk_classes_zip
from tvtk.code_gen import TVTKGenerator
File "/tmp/pip-install-855msxfa/mayavi/tvtk/code_gen.py", line 10, in <module>
import vtk_module as vtk
File "tvtk/vtk_module.py", line 15, in <module>
from vtk import *
File "/usr/local/lib/python3.6/dist-packages/vtk/__init__.py", line 12, in <module>
from .vtkOpenGLKit import *
File "/usr/local/lib/python3.6/dist-packages/vtk/vtkOpenGLKit.py", line 9, in <module>
from vtkOpenGLKitPython import *
ModuleNotFoundError: No module named 'vtkOpenGLKitPython'
----------------------------------------
ERROR: Failed building wheel for mayavi
Running setup.py clean for mayavi
Failed to build mayavi```