enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 284 forks source link

Stuck at `Building wheel for mayavi (setup.py)` #1065

Closed woochangchung closed 2 years ago

woochangchung commented 3 years ago

Here is my installation environment: Ubuntu 20.04 LTS on a ThinkPad P15 laptop image And when I do pip install mayavi, I get stuck during the Building wheel process: image

Python version is 3.8.10.

TravisPetit commented 3 years ago

Same problem here, also on Ubuntu 20.04 LTS. And when I try to install the bleeding edge version by cloning the repository I get a TVTK - VTK incompatibility error, as pointed out here #1061.

Older versions seem to also freeze during the installation.

DanMunchie commented 3 years ago

Same issue on Windows 10 64bit

Sbozzolo commented 3 years ago

Here is another (reproducible) example where it is not possible to build mayavi on Ubuntu 20.04 on a GitHub Actions runner.

Edit: the Action wouldn't work with ubuntu-18.04 either

Kukuster commented 3 years ago

reinstalling dependencies did help me with this. Try removing and installing:

• vtk • pyqt5 • libvtk6-dev • libpq5

again. Then try to install mayavi again

fbottarel commented 3 years ago

On Ubuntu 18.04 I managed to un-stuck the mayavi setup with the configuration

Not sure it will help tho. @woochangchung try downgrading the vtk package version installed via pip3 to something < 9.0.3

carlsonmark commented 3 years ago

Downgrading to vtk==9.0.1 worked for me on Ubuntu 20.04

bdenoun commented 3 years ago

Thanks a bunch @carlsonmark, pip install vtk==9.0.1 worked like a charm on my Ubuntu 20.04

cviviers commented 3 years ago

Downgrading to vtk==9.0.1 on windows 10 64bit, python 3.8 will also solve it. It still takes a while to build the wheel and can appear to be hanging.

DanMunchie commented 3 years ago

Downgrading to vtk==9.0.1 on windows 10 64bit, python 3.8 will also solve it. It still takes a while to build the wheel and can appear to be hanging.

Thanks for this - all working now!

Sbozzolo commented 3 years ago

I found that pinning to 9.0.1 works for python 3.6 (see github action, but not for python 3.9 (see github action. This is because there are no wheels for vtk 9.0.1 for python 3.9.

Qcellaris commented 3 years ago

vtk 9.0.1 with latest version of wheel works for me vtk 9.0.3 with wheel 0.34.2 works for me vtk 9.0.3 with latest version of wheel doesn't work for me

I don't know what the true issue is here, but now I just used the wheel 0.34.2 option.

fwilliams commented 2 years ago

There is no support for vtk 9.0.1 with python 3.9. Is there any progress on getting this to work with 9.0.3?

SiddharthaMithiya commented 2 years ago

Experiencing same thing, vtk-9.0.1 not available for python 3.9 starting from 9.0.2. A specific solution in needed, where everyone facing same problem in installation.

rahulporuri commented 2 years ago

@fwilliams and @SiddharthaMithiya we're working on making a release which supports the latest vtk versions (9.0.3 and 9.1.0 now). The current development branch contains the necessary fixes for vtk 9.0.3 so if possible, we recommend that you install mayavi from github directly, until we make a release.

SiddharthaMithiya commented 2 years ago

Thank you so much for your support. Actually let me explain the situation. We are doing our project work on Quantum mechanics this year, and we want to use mayavi, for 3d analysis, cause it's better than matplotlib's 3d environment. And we all stuck with this situation of installation.

Now, can you please explain me how to install it from GitHub? If we arange a Google meet then it will be very very helpful and fruitful for us. If you are agree for a Google meet then I will be forever grateful to you. I beg you to help us.

Thanking you in advance.

On Tue, Nov 9, 2021, 4:16 PM Poruri Sai Rahul @.***> wrote:

@fwilliams https://github.com/fwilliams and @SiddharthaMithiya https://github.com/SiddharthaMithiya we're working on making a release which supports the latest vtk versions (9.0.3 and 9.1.0 now). The current development branch contains the necessary fixes for vtk 9.0.3 so if possible, we recommend that you install mayavi from github directly, until we make a release.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enthought/mayavi/issues/1065#issuecomment-964029701, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEL2KEPNIRP6SYUOSEP3ELULD3XZANCNFSM5BUVXYFA .

rahulporuri commented 2 years ago

Now, can you please explain me how to install it from GitHub?

You need to do pip install git+https://github.com/mayavi.git@master#egg=mayavi. Ref https://pip.pypa.io/en/stable/topics/vcs-support/#git for more information regarding installing packages from git/github.

SiddharthaMithiya commented 2 years ago

sir, i tried it but it is giving this error

ERROR: Could not find a version that satisfies the requirement mayavi (unavailable) (from versions: 4.3.1, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.5.0, 4.6.0, 4.6.1, 4.6.2, 4.7.0, 4.7.1, 4.7.2, 4.7.3) ERROR: No matching distribution found for mayavi (unavailable)

On Wed, Nov 10, 2021 at 10:13 AM Poruri Sai Rahul @.***> wrote:

Now, can you please explain me how to install it from GitHub?

You need to do pip install git+ @.***#egg=mayavi. Ref https://pip.pypa.io/en/stable/topics/vcs-support/#git for more information regarding installing packages from git/github.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enthought/mayavi/issues/1065#issuecomment-964782022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEL2KB3Q5H2W7OB5J4RMITULHZ7HANCNFSM5BUVXYFA .

rahulporuri commented 2 years ago

@SiddharthaMithiya the command I mentioned earlier is wrong. Can you please run this command in your python environment - python -m pip install vtk==9.0.3 git+https://github.com/enthought/mayavi.git@master#egg=mayavi and copy-paste the full output of that command?

SiddharthaMithiya commented 2 years ago

I tried it sir. But still it giving ERROR, while building wheel for mayavi. Here is the error massage below.

" Building wheels for collected packages: mayavi Building wheel for mayavi (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\setup.py'"'"'; file='"'"'C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-wheel-9gsaspcy' cwd: C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\ Complete output (45 lines): running bdist_wheel running build

Building TVTK classes... Traceback (most recent call last): File "", line 1, in File "C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\setup.py", line 411, in setup( File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\distutils\core.py", line 169, in setup return old_setup(new_attr) File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools__init__.py", line 165, in setup return distutils.core.setup(attrs) File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\site-packages\wheel\bdist_wheel.py", line 299, in run self.run_command('build') File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\SIDDHARTHA\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\setup.py", line 268, in run build_tvtk_classes_zip() File "C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\setup.py", line 254, in build_tvtk_classes_zip gen_tvtk_classes_zip() File "tvtk\setup.py", line 98, in gen_tvtk_classes_zip

as things get removed from the original list, the indices

File

"C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\tvtk\code_gen.py", line 132, in generate_code self._write_wrapper_class(node, tvtk_name) File "C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\tvtk\code_gen.py", line 224, in _write_wrapper_class self.wrap_gen.generate_code(node, out) File "C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\tvtk\wrapper_gen.py", line 242, in generate_code self._gen_methods(node, out) File "C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\tvtk\wrapper_gen.py", line 361, in _gen_methods get_set, allow_update_failure = self._gen_get_set_methods(klass, out) File "C:\Users\SIDDHARTHA\AppData\Local\Temp\pip-install-l39rok_y\mayavi_396f7023c28b4c458584db94aa1f5b85\tvtk\wrapper_gen.py", line 748, in _gen_get_set_methods if not meths[vtk_attr_name] and get_sig[0][1]: IndexError: list index out of range

Failed on Logger (#3 of 11 nodes, #18 of 32 subnodes)


ERROR: Failed building wheel for mayavi " Sir, it is also to be mentioned that, after the error message, this thing also happened. " Running setup.py clean for mayavi Failed to build mayavi Installing collected packages: vtk, mayavi Attempting uninstall: vtk Found existing installation: vtk 9.1.0 Uninstalling vtk-9.1.0: Successfully uninstalled vtk-9.1.0 Running setup.py install for mayavi ... done DEPRECATION: mayavi was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. A possible replacement is to fix the wheel build issue reported above. Discussion can be found at https://github.com/pypa/pip/issues/8368 Successfully installed mayavi-4.7.4.dev0 vtk-9.0.3 " Sir, what should I do now?

On Wed, Nov 10, 2021 at 12:05 PM Poruri Sai Rahul @.***> wrote:

@SiddharthaMithiya https://github.com/SiddharthaMithiya the command I mentioned earlier is wrong. Can you please run this command in your python environment - python -m pip install vtk==9.0.3 git+ @.***#egg=mayavi and copy-paste the full output of that command?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enthought/mayavi/issues/1065#issuecomment-964828384, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEL2KCUEPT6V7GS3LEI6GDULIHDLANCNFSM5BUVXYFA .

rahulporuri commented 2 years ago

Successfully installed mayavi-4.7.4.dev0 vtk-9.0.3

@SiddharthaMithiya ignoring the first error, the installation seems to have worked because of this message. I think the installation worked. Can you try running import mayavi from the python prompt?

SiddharthaMithiya commented 2 years ago

yes sir it's working fine. i'm following pravu Ramachandan's tutorial video in youtube lectured in Scipy 2018. i saved a test plot also.

On Wed, Nov 10, 2021 at 12:31 PM Poruri Sai Rahul @.***> wrote:

Successfully installed mayavi-4.7.4.dev0 vtk-9.0.3

@SiddharthaMithiya https://github.com/SiddharthaMithiya ignoring the first error, the installation seems to have worked because of this message. I think the installation worked. Can you try running import mayavi from the python prompt?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enthought/mayavi/issues/1065#issuecomment-964840079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEL2KE7EGQZNFBBRNE6QDDULIKGJANCNFSM5BUVXYFA .

SiddharthaMithiya commented 2 years ago

It is working fine sir. As I work mainly in pycharm, i did the same thing in pycharm terminal and i can use it there also. THANK YOU SO MUCH SIR.

On Wed, Nov 10, 2021 at 12:44 PM Siddhartha Mithiya < @.***> wrote:

yes sir it's working fine. i'm following pravu Ramachandan's tutorial video in youtube lectured in Scipy 2018. i saved a test plot also.

On Wed, Nov 10, 2021 at 12:31 PM Poruri Sai Rahul < @.***> wrote:

Successfully installed mayavi-4.7.4.dev0 vtk-9.0.3

@SiddharthaMithiya https://github.com/SiddharthaMithiya ignoring the first error, the installation seems to have worked because of this message. I think the installation worked. Can you try running import mayavi from the python prompt?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/enthought/mayavi/issues/1065#issuecomment-964840079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEL2KE7EGQZNFBBRNE6QDDULIKGJANCNFSM5BUVXYFA .

rahulporuri commented 2 years ago

closing as the latest 4.7.4 mayavi release fixes this issue. please try reinstalling mayavi.

yumendecc commented 2 years ago

在 Ubuntu 20.04 上降级到 vtk==9.0.1 对我有用 对我也有用 ubuntu 20.04

AmruthGudigar111 commented 1 year ago

@rahulporuri I am getting error like this when i trying to install in windows 64 bit system Python version is 3.11

PLease help me with this error

image