Closed sean-reed closed 1 year ago
Same error here! Despite attempting to install into a clean Windows 10 miniconda environment. Recommendations online were to use older Numpy versions, which forced me to use older Pandas, and older Python. Ended up installing Numpy v1.22.3, Pandas v1.3.5, and Python v3.7 before finally getting Mayavi to install. Subsequently fails to execute code because of various version difficulties. Happy to supply further details if needed.
Sorry for slow responses, it has been a busy semester. I will be taking a look and will try to push a fix tonight or in the next couple of days.
I've pushed a fix in #1233 but that may take a little while to merge as there are other unrelated issues, in the meanwhile you can try it out if you want from my branch here: https://github.com/prabhuramachandran/mayavi/tree/fix-vtk-9.2.6-issues
I've merged #1199 instead which fixes the issue nicely. Could you please try with master or with this:
$ pip install https://github.com/enthought/mayavi/zipball/master
Hey @prabhuramachandran, that installed fine into a clean miniconda env. I've only tested with running mayavi2 at the terminal, but seems ok. Thanks.
Being a bit of a newbie though, that didn't seem to install to the environment. It looks like it may have installed directly into the Python/Scripts area of my main Python distro, or at least mayavi2.exe did. It's not on any listing in the environment. Anyway, I don't want to bother you with newbie queries, but definitely this is not a desirable outcome. I'll try again with the pip installs to the conda environment to see if it works, but would be great to back out any changes I've made to Python outside the environment.
Ok, so, still same error when using 'pip install mayavi' ... and since I don't know how to install that tarball just to the environment I want it in, I can't check if I can use mayavi modules from the Python program. Sorry I'm not experienced enough to test all this, or understand all the various configurations I need to change.
Hi @prabhuramachandran thanks for looking into this and pushing a fix! I tried
$ pip install https://github.com/enthought/mayavi/zipball/master
and initially got the following error:
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [69 lines of output]
<string>:13: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
running egg_info
running build_src
Building tvtk_classes.zip
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 432, in <module>
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/numpy/distutils/command/egg_info.py", line 24, in run
self.run_command("build_src")
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 299, in run
File "<string>", line 273, in build_tvtk_classes_zip
File "/tmp/pip-req-build-qv9wj0ph/tvtk/setup.py", line 82, in gen_tvtk_classes_zip
from tvtk.code_gen import TVTKGenerator
File "/tmp/pip-req-build-qv9wj0ph/tvtk/code_gen.py", line 30, in <module>
from .common import get_tvtk_name, camel2enthought
File "/tmp/pip-req-build-qv9wj0ph/tvtk/common.py", line 10, in <module>
import vtk
File "/tmp/pip-build-env-yz04veer/overlay/lib/python3.11/site-packages/vtk.py", line 5, in <module>
from vtkmodules.vtkWebCore import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
However, I was able to resolve it by installing the missing dependency:
apt-get install libgl1-mesa-gl
and then it installed without any errors. Thanks again.
Thank you. I encountered the same error on Mac and this
$ pip install https://github.com/enthought/mayavi/zipball/master
seemed to work well up to now.
Installing Mayavi with
pip install mayavi
gives the following error:I am running the install command on a Debian based Python 3.11 container (mcr.microsoft.com/devcontainers/python:0-3.11).