Giter Site home page Giter Site logo

black (blank) plot on ubuntu about pyvistaqt HOT 21 OPEN

pyvista avatar pyvista commented on May 25, 2024
black (blank) plot on ubuntu

from pyvistaqt.

Comments (21)

Xiaoyuew avatar Xiaoyuew commented on May 25, 2024 2

I have changed to a NVIDIA card and the anti-aliasing no longer causes black screen. Thank you! @GuillaumeFavelier

from pyvistaqt.

akaszynski avatar akaszynski commented on May 25, 2024 1

Could you try installing vtk==8.1.2? That's been causing some issues and it might be part of the problem. Installing it through vtk should work.

Also, pyqt5==5.11.x has been the most successful for us, so we've gone with that, but you're free to choose a different version.

from pyvistaqt.

Xiaoyuew avatar Xiaoyuew commented on May 25, 2024 1

Yes I use MESA. If it is a problem of GPU I could probably solve it. I will be changing my GPU tomorrow.

from pyvistaqt.

AndrewAnnex avatar AndrewAnnex commented on May 25, 2024

I am wondering if this is due to pyqt/pyqt5 as pyqt installs some packages like sip from pypi and not the conda-forge

pyqt5 5.11.x are not available on the forge

from pyvistaqt.

AndrewAnnex avatar AndrewAnnex commented on May 25, 2024

from pyvistaqt.

akaszynski avatar akaszynski commented on May 25, 2024

That might be part of the issue then. I've found pyqt5 to be incredibly finicky version to version, and I think you'll have better luck outside the conda releases. If you're using Ubuntu (as am I), the python wheels tend to be quite stable (at least with the right versions).

from pyvistaqt.

AndrewAnnex avatar AndrewAnnex commented on May 25, 2024

@akaszynski I think there is a typo in either the pyvista or pyvistaqt conda forge yamls where "pyqt" and "qt" is being installed along with pyqt5, pyqt5-sip, pyqtchart, pyqtwebengine that are installed by pip in one or the other recipe. I wasn't able to get a working conda environment until I used pip only to install pyvista and pyvistaqt and necessary dependencies (see below), and when I did I didn't see any additional "qt" dependencies from the conda forge in the environment.

creating a new environment and then running "pip install pyqt5==5.11.3 pyvista pyvistaqt vtk==8.1.2" worked for me,

however this issue will need to be fixed because vtk 8.1.2 is not available for python 3.8 or forward

I think some version pinning or TLC for the conda forge feedstocks are needed

from pyvistaqt.

AndrewAnnex avatar AndrewAnnex commented on May 25, 2024

@akaszynski I should amend this to say, that in this environment I want to be able to run jupyter which requires qt/pyqt. So although you can get a working environment it would be difficult to resolve a functioning environment without careful editing. The end solution is to fix whatever is wrong with pyvista/pyvistaqt

from pyvistaqt.

GuillaumeFavelier avatar GuillaumeFavelier commented on May 25, 2024

The environment.yml config file was updated recently so I think it's worth trying again on master(a0babd5) @AndrewAnnex. Do not hesitate to let us know how it goes for you.

from pyvistaqt.

AndrewAnnex avatar AndrewAnnex commented on May 25, 2024

@GuillaumeFavelier I am actually still running into this issue, annoyingly I cannot downgrade vtk because 8.2 and 8.1.2 does not support python 3.8 so I am stuck with vtk 9.0.1unless I can safely downgrade the python version

from pyvistaqt.

GuillaumeFavelier avatar GuillaumeFavelier commented on May 25, 2024

So you upgraded pyvista and pyvistaqt? Can you share a minimal snippet of the code that reproduces the issue?

from pyvistaqt.

AndrewAnnex avatar AndrewAnnex commented on May 25, 2024

code snippet:

import pyvista as pv                         
import pyvistaqt as pvqt                     
p = pvqt.BackgroundPlotter()                 
p.add_mesh(pv.Sphere())                      
p.show() 

as some amount of time has passed here is an updated run of pv.Report:

--------------------------------------------------------------------------------
  Date: Tue Jun 22 09:15:50 2021 EDT

                OS : Linux
            CPU(s) : 16
           Machine : x86_64
      Architecture : 64bit
               RAM : 62.8 GB
       Environment : IPython
        GPU Vendor : NVIDIA Corporation
      GPU Renderer : GeForce GTX 1080 Ti/PCIe/SSE2
       GPU Version : 4.5.0 NVIDIA 460.80

  Python 3.8.5 (default, Sep  4 2020, 07:30:14)  [GCC 7.3.0]

           pyvista : 0.31.2
               vtk : 9.0.1
             numpy : 1.19.5
           imageio : 2.9.0
           appdirs : 1.4.4
            scooby : 0.5.6
            meshio : 4.1.1
        matplotlib : 3.3.0
         pyvistaqt : 0.5.0
             PyQt5 : 5.12.3
           IPython : 7.17.0
          colorcet : 1.0.0
             scipy : 1.6.3
        itkwidgets : 0.32.0
              tqdm : 4.61.1
--------------------------------------------------------------------------------

from pyvistaqt.

akaszynski avatar akaszynski commented on May 25, 2024

You can update to the latest dev wheels with pip install vtk==9.0.20210612.dev0. We're working on a few bug fixes regarding these wheels, but it's quite stable outside of Mesa OpenGL in Windows.

from pyvistaqt.

AndrewAnnex avatar AndrewAnnex commented on May 25, 2024

@akaszynski yay it works!

Note for others the steps were to:

  1. uninstall pyvista/pyvistaqt/vtk first with mamba/conda
  2. pip install vtk==9.0.20210612.dev0
  3. mamba install pyvista pyvistaqt --no-deps (otherwise it tries to install vtk from conda-forge)

Although my immediate issue is solved, eventually I would like to be able to continue to rely on the conda-forge distribution to make my conda env easier to share. If fixes can't be worked into the feedstock for vtk, maybe the docs for pyvistaqt/pyvista could be updated to include the fix(es) for this issue? I'm not sure how commonly this issue is run into but judging by the repo maybe I just have a strange conda environment

from pyvistaqt.

akaszynski avatar akaszynski commented on May 25, 2024

Thanks for posting the steps to your workaround.

maybe the docs for pyvistaqt/pyvista could be updated to include the fix(es) for this issue?

We're going to wait some time until VTK either releases stable wheels or, should that take longer than a month or two, add in notes regarding the workaround you noted.

from pyvistaqt.

Xiaoyuew avatar Xiaoyuew commented on May 25, 2024

I encountered same problem, could you please help me? I have:
Python 3.8.10
vtk==9.1.0
PyQt5==5.15.6
pyvistaqt==0.7.0
pyvista==0.33.3
I tried the above solutions but didn't help. I cannot find vtk==9.0.20210612.dev0.
The strange thing is the above versions work on my Windows system but do not work on Ubuntu. Any idea of why is that?

from pyvistaqt.

Xiaoyuew avatar Xiaoyuew commented on May 25, 2024

I solved the black screen problem by cancelling anti-aliasing, but I don't understand why

from pyvistaqt.

GuillaumeFavelier avatar GuillaumeFavelier commented on May 25, 2024

I solved the black screen problem by cancelling anti-aliasing, but I don't understand why

Thanks for reporting here @Xiaoyuew. We discovered in some cases that anti-aliasing, when not supported by the renderer, produces a black screen. I am not entirely sure of the reason but I have some guesses. Do you use MESA?

One way to know is to look at the GPU Renderer section of python -c "import pyvista; print(pyvista.Report())"

from pyvistaqt.

JacobBumgarner avatar JacobBumgarner commented on May 25, 2024

@Xiaoyuew Could you elaborate on how you configured pyvista to recognize your NVIDIA card on Ubuntu? I'm in WSL2 and am having some trouble getting it configured. Thanks!

from pyvistaqt.

Xiaoyuew avatar Xiaoyuew commented on May 25, 2024

It's some time ago, but I think it is just a matter of GPU driver. If you get the correct driver then pyvista can recognize it. @JacobBumgarner

@Xiaoyuew Could you elaborate on how you configured pyvista to recognize your NVIDIA card on Ubuntu? I'm in WSL2 and am having some trouble getting it configured. Thanks!

from pyvistaqt.

JacobBumgarner avatar JacobBumgarner commented on May 25, 2024

I appreciate your response. I'm guessing that I would need to recompile VTK with the appropriate GPU configurations. Does that seem right to you? No worries if you don't remember, I know it's been a long time 😄

Thanks, @Xiaoyuew

from pyvistaqt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.