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
Problem with mayavi.mlab #652
Comments
Hi, I also have the same problem and would appreciate any help to resolve this issue. I'm using Windows 10 (64 bit) and Python 3.6.5 |Anaconda, Inc.| [MSC v.1900 64 bit (AMD64)] |
@Ecauchy -- please let us know how exactly you did the install? I have no idea which version anaconda ships. Right now if you have numpy installed you should be able to |
@prabhuramachandran Just used |
I have the same issue when installing mayavi 4.6.0 (and vtk 8.1.1) from the conda-forge repository. Motivated by the previous comment from @Ecauchy, I checked the version history at conda-forge: It was only recently updated from mayavi 4.5.0 (and vtk 7.1.1). Installing/Reverting to mayavi 4.5.0 (and vtk 7.1.1) from conda-forge is working. |
@Ecauchy, @christian-drescher -- can you let me know if removing the conda-forge package and then just doing a pip install of vtk and mayavi works? If so, then this is a conda-forge issue and nothing to do with Mayavi. |
Although it would help to know if it is the VTK package or Mayavi package that has a problem. What if you installed vtk 7.1.1 from conda-forge and pip install mayavi? |
I have the same problem |
@prabhuramachandran, this is to acknowledge your request but I have to pass on pip install anything when there is no wheels blob. (I find it troublesome to setup all build tools with restricted rights on my corporate machine.) |
Having vtk in the |
@bergtholdt -- Thank you for that. This is unfortunate and another irritating aspect of the different ways we have to package and install things in the Python world. Sigh. So what are we to do now? If I do not have it in the requires then people cannot just run |
Should we ask the question to the conda developers?
Sent from my phone. Please forgive typos and briefness.
…On Jun 21, 2018, 16:30, at 16:30, Prabhu Ramachandran ***@***.***> wrote:
@bergtholdt -- Thank you for that. This is unfortunate and another
irritating aspect of the different ways we have to package and install
things in the Python world. Sigh. So what are we to do now? If I do
not have it in the requires then people cannot just run `pip install
mayavi` and expect things to work for the most part. Is this a problem
with conda? I am not sure that only a python wheel has the right to
provide a distribution, pip should pick up any installed package
typically unless conda is doing something different, no?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#652 (comment)
|
@GaelVaroquaux -- would be great if someone did. Just let me know what the best way to resolve this would be. I will be meeting folks at SciPy this year so can address it then but in the meanwhile it would help if someone could throw some light on this. |
I don't think it has anything to do with the wheel coming from pypi. Just a normal installation via a CMake install mechanism in the standard vtk wrappers does not seem to provide a "distribution" (in the jargon of setuptools / pkg_resources) and so we get this DistributionNotFound error when we import mayavi.mlab. Hopefully the conda-forge maintainers for vtk will be able to provide the package with "distribution support" so that that the |
@prabhuramachandran -- can we talk at sprints this weekend? I'm part of conda-forge and would like to see this get resolved 😀 |
(I should add that I'll need help understanding the problem and how VTKPythonPackage solves it). |
@mwcraig -- yes, sure, I plan to be at the sprints tomorrow. |
Should it work now? I have the same problem. I'm using 64-bit Python 3.6.5 with Miniconda. |
It ought to IIRC, Matt fixed this at SciPy and the PR has been merged. See the other PR listed above if there are issues. I just tested on Python 3.6 and it does seem to be resolved and fixed. So try installing the conda-forge VTK package and then pip install Mayavi. Closing this as the issue is now resolved. |
i meet the same problem and i solved by using your commands. thanks! But how do you get this commands? |
Hi, this problem is still on. |
Hi, Thank you in advance for considering this issue again. |
Can someone who is having this problem please report which version of vtk is installed when you have the problem? I won't have time to look at this for at least a week or two but if you can recreate the problem and then paste the output of |
Here is the output of a test environment to show the problem, and created with
Conda list
Issue(maya) λ python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
>>> import mayavi
>>> from mayavi import mlab
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\mayavi\mlab.py", line 16, in <module>
from mayavi.tools.camera import view, roll, yaw, pitch, move
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\mayavi\tools\camera.py", line 24, in <module>
from .engine_manager import get_engine
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\mayavi\tools\engine_manager.py", line 14, in <module>
from mayavi.core.engine import Engine
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\mayavi\core\engine.py", line 34, in <module>
from mayavi.core.ui.mayavi_scene import viewer_factory
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\mayavi\core\ui\mayavi_scene.py", line 12, in <module>
from tvtk.tools.ivtk import IVTK
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\tvtk\tools\ivtk.py", line 35, in <module>
from tvtk.pyface.api import Scene, DecoratedScene
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\tvtk\pyface\api.py", line 1, in <module>
from .decorated_scene import DecoratedScene
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\tvtk\pyface\decorated_scene.py", line 12, in <module>
from tvtk.pyface.toolkit import toolkit_object
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\tvtk\pyface\toolkit.py", line 3, in <module>
toolkit = toolkit_object = find_toolkit('tvtk.toolkits')
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\pyface\base_toolkit.py", line 263, in find_toolkit
return import_toolkit(ETSConfig.toolkit, entry_point)
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\pyface\base_toolkit.py", line 217, in import_toolkit
toolkit_object = plugin.load()
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\pkg_resources\__init__.py", line 2331, in load
self.require(*args, **kwargs)
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\pkg_resources\__init__.py", line 2354, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "C:\Python\Anaconda64\envs\maya\lib\site-packages\pkg_resources\__init__.py", line 781, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'vtk' distribution was not found and is required by the application
>>> |
Version: anaconda3-5.0.1 Meet the same problem when
I install the VTK and Mayavi by:
Conda List
|
Now, I find that even
|
@ggyyhw -- The first issue is probably because you have |
Thanks! As you suggested, I removed conda VTK and conda mayavi (also manually delete all the related folders), then use |
` File "", line 1, in File "C:\ProgramData\Anaconda3\lib\site-packages\mayavi\mlab.py", line 16, in File "C:\ProgramData\Anaconda3\lib\site-packages\mayavi\tools\camera.py", line 24, in File "C:\ProgramData\Anaconda3\lib\site-packages\mayavi\tools\engine_manager.py", line 14, in File "C:\ProgramData\Anaconda3\lib\site-packages\mayavi\core\engine.py", line 34, in File "C:\ProgramData\Anaconda3\lib\site-packages\mayavi\core\ui\mayavi_scene.py", line 12, in File "C:\ProgramData\Anaconda3\lib\site-packages\tvtk\tools\ivtk.py", line 35, in File "C:\ProgramData\Anaconda3\lib\site-packages\tvtk\pyface\api.py", line 1, in File "C:\ProgramData\Anaconda3\lib\site-packages\tvtk\pyface\decorated_scene.py", line 12, in File "C:\ProgramData\Anaconda3\lib\site-packages\tvtk\pyface\toolkit.py", line 3, in File "C:\ProgramData\Anaconda3\lib\site-packages\pyface\base_toolkit.py", line 263, in find_toolkit File "C:\ProgramData\Anaconda3\lib\site-packages\pyface\base_toolkit.py", line 217, in import_toolkit File "C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py", line 2323, in load File "C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py", line 2346, in require File "C:\ProgramData\Anaconda3\lib\site-packages\pkg_resources_init_.py", line 778, in resolve DistributionNotFound: The 'vtk' distribution was not found and is required by the application |
` packages in environment at C:\ProgramData\Anaconda3:Name Version Build Channel_ipyw_jlab_nb_ext_conf 0.1.0 py36he6757f0_0 ` |
Just |
this helps in win10 conda environment, and this also solved the conflict between opencv and mayavi in my computer. I think linux also suitable. The solution won't work on win7. |
I just experienced this problem installing the latest release version (mayavi-4.6.2 and latest enthought dependencies) via Macports. No Conda, no pip, just |
Same issue, e.g. when using
Anaconda (packages from from But Any workarounds for this? |
@solarjoe, as described above, it seems that one workaround is to use pip to install mayavi. @prabhuramachandran, please reopen. This is is not fixed for reasonable installation cases. |
This worked for me too. |
Using |
I would like to point out that this problem also happens on linux (Fedora 30 to be specific). |
I faced the same problem and waste a lot of time. if you are installing from anaconda command prompt |
Remember to run |
I have the same issue. Following some suggestions I use pip and that failed: conda create --name test_mayavi --channel conda-forge python=3.9.5 Can someone explain why what should work isn't? |
I changed it to conda instead of pip and that installed and I was able to run a quick test. However using mlab.show fails with the following error: b'\x1b[0m\x1b[31m2021-12-17 13:33:35.324 ( 29.098s) [ C4572740]vtkOpenGLRenderWindow.c:575 ERR| vtkXOpenGLRenderWindow (0x5588abd38d60): Unable to find a valid OpenGL 3.2 or later implementation. |
Actually I should call it a problem with vtk or something else.
I use anaconda to install it, successfully.
import vtk
OKimport mayavi
No problemfrom mayavi import mlab
I use
The text was updated successfully, but these errors were encountered: