conda-forge / mayavi-feedstock

A conda-smithy repository for mayavi.
BSD 3-Clause "New" or "Revised" License
4 stars 18 forks source link

vtk may need the build variant #85

Closed moorepants closed 4 months ago

moorepants commented 4 months ago

Solution to issue cannot be found in the documentation.

Issue

I have a mayavi based app. If I do:

conda create -n yeadon-test yeadon mayavi

and then run the yeadon command in that environment, the vtk based figure does not display: image

Here are the vtk and qt related packages in the environment:

(yeadon-test) moorepants@nandi:~$ conda list | grep vtk
vtk                       9.3.0           osmesa_py312h1234567_100    conda-forge
vtk-base                  9.3.0           osmesa_py312h1234567_100    conda-forge
vtk-io-ffmpeg             9.3.0           osmesa_py312h1234567_100    conda-forge
(yeadon-test) moorepants@nandi:~$ conda list | grep qt
mayavi                    4.8.2           pyqt_py312h0377b68_204    conda-forge
pyqt                      5.15.9          py312h949fe66_5    conda-forge
pyqt5-sip                 12.12.2         py312h30efb56_5    conda-forge
qt-main                   5.15.8              ha2b5568_22    conda-forge

but if I do:

conda create -n yeadon-test yeadon mayavi vtk

the app works as expected: image

It seems to be because a different vtk is installed:

(yeadon-test) moorepants@nandi:~$ conda list | grep vtk
vtk                       9.3.0           qt_py312h1234567_200    conda-forge
vtk-base                  9.3.0           qt_py312h1234567_200    conda-forge
vtk-io-ffmpeg             9.3.0           qt_py312h1234567_200    conda-forge
(yeadon-test) moorepants@nandi:~$ conda list | grep qt
mayavi                    4.8.2           pyqt_py312h0377b68_204    conda-forge
pyqt                      5.15.9          py312h949fe66_5    conda-forge
pyqt5-sip                 12.12.2         py312h30efb56_5    conda-forge
qt-main                   5.15.8              hc9dc06e_21    conda-forge
qt6-main                  6.7.2                h402ef58_0    conda-forge
vtk                       9.3.0           qt_py312h1234567_200    conda-forge
vtk-base                  9.3.0           qt_py312h1234567_200    conda-forge
vtk-io-ffmpeg             9.3.0           qt_py312h1234567_200    conda-forge

I'm not quite sure why different versions are installed with and without including vtk explicitly.

Installed packages

# packages in environment at /home/moorepants/miniconda/envs/yeadon-test:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
aiohttp                   3.9.5           py312h98912ed_0    conda-forge
aiosignal                 1.3.1              pyhd8ed1ab_0    conda-forge
alsa-lib                  1.2.12               h4ab18f5_0    conda-forge
aom                       3.9.1                hac33072_0    conda-forge
apptools                  5.1.0              pyh44b312d_0    conda-forge
attr                      2.5.1                h166bdaf_1    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
blosc                     1.21.6               hef167b5_0    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.28.1               hd590300_0    conda-forge
ca-certificates           2024.7.4             hbcca054_0    conda-forge
cairo                     1.18.0               hbb29018_2    conda-forge
configobj                 5.0.8              pyhd8ed1ab_0    conda-forge
dav1d                     1.2.1                hd590300_0    conda-forge
dbus                      1.13.6               h5008d03_3    conda-forge
double-conversion         3.3.0                h59595ed_0    conda-forge
eigen                     3.4.0                h00ab1b0_0    conda-forge
elfutils                  0.191                h924a536_0    conda-forge
envisage                  6.0.1              pyhd8ed1ab_0    conda-forge
expat                     2.6.2                h59595ed_0    conda-forge
ffmpeg                    7.0.1           gpl_h3589c0a_102    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_2    conda-forge
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               h267a509_2    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
frozenlist                1.4.1           py312h98912ed_0    conda-forge
gettext                   0.22.5               h59595ed_2    conda-forge
gettext-tools             0.22.5               h59595ed_2    conda-forge
gl2ps                     1.4.2                hae5d5c5_1    conda-forge
glib                      2.80.3               h8a4344b_1    conda-forge
glib-tools                2.80.3               h73ef956_1    conda-forge
gmp                       6.3.0                hac33072_2    conda-forge
gnutls                    3.7.9                hb077bed_0    conda-forge
graphite2                 1.3.13            h59595ed_1003    conda-forge
gst-plugins-base          1.24.5               hbaaba92_0    conda-forge
gstreamer                 1.24.5               haf2f30d_0    conda-forge
harfbuzz                  8.5.0                hfac3d4d_0    conda-forge
hdf4                      4.2.15               h2a13503_7    conda-forge
hdf5                      1.14.3          nompi_hdf9ad27_105    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
importlib-metadata        8.0.0              pyha770c72_0    conda-forge
importlib_metadata        8.0.0                hd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
jsoncpp                   1.9.5                h4bd325d_1    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.3               h659f571_0    conda-forge
lame                      3.100             h166bdaf_1003    conda-forge
ld_impl_linux-64          2.40                 hf3520f5_7    conda-forge
lerc                      4.0.0                h27087fc_0    conda-forge
libabseil                 20240116.2      cxx17_h59595ed_0    conda-forge
libaec                    1.1.3                h59595ed_0    conda-forge
libarchive                3.7.4                hfca40fe_0    conda-forge
libasprintf               0.22.5               h661eb56_2    conda-forge
libasprintf-devel         0.22.5               h661eb56_2    conda-forge
libass                    0.17.1               h8fe9dca_1    conda-forge
libblas                   3.9.0           22_linux64_openblas    conda-forge
libcap                    2.69                 h0f662aa_0    conda-forge
libcblas                  3.9.0           22_linux64_openblas    conda-forge
libclang-cpp15            15.0.7          default_h127d8a8_5    conda-forge
libclang13                18.1.8          default_h6ae225f_0    conda-forge
libcups                   2.3.3                h4637d8d_4    conda-forge
libcurl                   8.8.0                hca28451_1    conda-forge
libdeflate                1.20                 hd590300_0    conda-forge
libdrm                    2.4.122              h4ab18f5_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libexpat                  2.6.2                h59595ed_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflac                   1.4.3                h59595ed_0    conda-forge
libgcc-ng                 14.1.0               h77fa898_0    conda-forge
libgcrypt                 1.11.0               h4ab18f5_0    conda-forge
libgettextpo              0.22.5               h59595ed_2    conda-forge
libgettextpo-devel        0.22.5               h59595ed_2    conda-forge
libgfortran-ng            14.1.0               h69a702a_0    conda-forge
libgfortran5              14.1.0               hc5f4f2c_0    conda-forge
libglib                   2.80.3               h8a4344b_1    conda-forge
libgomp                   14.1.0               h77fa898_0    conda-forge
libgpg-error              1.50                 h4f305b6_0    conda-forge
libhwloc                  2.11.0          default_h5622ce7_1000    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libidn2                   2.3.7                hd590300_0    conda-forge
libjpeg-turbo             3.0.0                hd590300_1    conda-forge
liblapack                 3.9.0           22_linux64_openblas    conda-forge
libllvm15                 15.0.7               hb3ce162_4    conda-forge
libllvm18                 18.1.8               hc9dba70_0    conda-forge
libmicrohttpd             1.0.1                h97afed2_0    conda-forge
libnetcdf                 4.9.2           nompi_h135f659_114    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnsl                    2.0.1                hd590300_0    conda-forge
libogg                    1.3.5                h4ab18f5_0    conda-forge
libopenblas               0.3.27          pthreads_hac2b453_1    conda-forge
libopenvino               2024.2.0             h2da1b83_1    conda-forge
libopenvino-auto-batch-plugin 2024.2.0             hb045406_1    conda-forge
libopenvino-auto-plugin   2024.2.0             hb045406_1    conda-forge
libopenvino-hetero-plugin 2024.2.0             h5c03a75_1    conda-forge
libopenvino-intel-cpu-plugin 2024.2.0             h2da1b83_1    conda-forge
libopenvino-intel-gpu-plugin 2024.2.0             h2da1b83_1    conda-forge
libopenvino-intel-npu-plugin 2024.2.0             he02047a_1    conda-forge
libopenvino-ir-frontend   2024.2.0             h5c03a75_1    conda-forge
libopenvino-onnx-frontend 2024.2.0             h07e8aee_1    conda-forge
libopenvino-paddle-frontend 2024.2.0             h07e8aee_1    conda-forge
libopenvino-pytorch-frontend 2024.2.0             he02047a_1    conda-forge
libopenvino-tensorflow-frontend 2024.2.0             h39126c6_1    conda-forge
libopenvino-tensorflow-lite-frontend 2024.2.0             he02047a_1    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpciaccess              0.18                 hd590300_0    conda-forge
libpng                    1.6.43               h2797004_0    conda-forge
libpq                     16.3                 ha72fbe1_0    conda-forge
libprotobuf               4.25.3               h08a7969_0    conda-forge
libsndfile                1.2.2                hc60ed4a_1    conda-forge
libsqlite                 3.46.0               hde9e2c9_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              14.1.0               hc0a3c3a_0    conda-forge
libsystemd0               255                  h3516f8a_1    conda-forge
libtasn1                  4.19.0               h166bdaf_0    conda-forge
libtheora                 1.1.1             h4ab18f5_1006    conda-forge
libtiff                   4.6.0                h1dd3fc0_3    conda-forge
libunistring              0.9.10               h7f98852_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libva                     2.22.0               hb711507_0    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libvpx                    1.14.1               hac33072_0    conda-forge
libwebp-base              1.4.0                hd590300_0    conda-forge
libxcb                    1.16                 hd590300_0    conda-forge
libxcrypt                 4.4.36               hd590300_1    conda-forge
libxkbcommon              1.7.0                h2c5496b_1    conda-forge
libxml2                   2.12.7               hc051c1a_1    conda-forge
libzip                    1.10.1               h2629f0a_3    conda-forge
libzlib                   1.3.1                h4ab18f5_1    conda-forge
loguru                    0.7.2           py312h7900ff3_1    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
lzo                       2.10              hd590300_1001    conda-forge
mayavi                    4.8.2           pyqt_py312h0377b68_204    conda-forge
mesalib                   24.1.3               h3ac77ca_0    conda-forge
mpg123                    1.32.6               h59595ed_0    conda-forge
msgpack-python            1.0.8           py312h2492b07_0    conda-forge
multidict                 6.0.5           py312h98912ed_0    conda-forge
mysql-common              8.3.0                hf1915f5_4    conda-forge
mysql-libs                8.3.0                hca2cd23_4    conda-forge
ncurses                   6.5                  h59595ed_0    conda-forge
nettle                    3.9.1                h7ab15ed_0    conda-forge
nlohmann_json             3.11.3               h59595ed_0    conda-forge
nspr                      4.35                 h27087fc_0    conda-forge
nss                       3.102                h593d115_0    conda-forge
numpy                     2.0.0           py312h22e1c76_0    conda-forge
ocl-icd                   2.3.2                hd590300_1    conda-forge
openh264                  2.4.1                h59595ed_0    conda-forge
openssl                   3.3.1                h4ab18f5_1    conda-forge
p11-kit                   0.24.1               hc5aa10d_0    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pcre2                     10.44                h0f59acf_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pixman                    0.43.2               h59595ed_0    conda-forge
ply                       3.11               pyhd8ed1ab_2    conda-forge
proj                      9.3.1                h1d62c97_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pugixml                   1.14                 h59595ed_0    conda-forge
pulseaudio-client         17.0                 hb77b528_0    conda-forge
pyface                    8.0.0              pyhd8ed1ab_1    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9          py312h949fe66_5    conda-forge
pyqt5-sip                 12.12.2         py312h30efb56_5    conda-forge
python                    3.12.4          h194c7f8_0_cpython    conda-forge
python_abi                3.12                    4_cp312    conda-forge
pyyaml                    6.0.1           py312h98912ed_1    conda-forge
qt-main                   5.15.8              ha2b5568_22    conda-forge
readline                  8.2                  h8228510_1    conda-forge
setuptools                70.2.0             pyhd8ed1ab_0    conda-forge
sip                       6.7.12          py312h30efb56_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.2.1                ha2e4443_0    conda-forge
sqlite                    3.46.0               h6d4b2fc_0    conda-forge
svt-av1                   2.1.0                hac33072_0    conda-forge
tbb                       2021.12.0            h434a139_2    conda-forge
tbb-devel                 2021.12.0            h2069b90_2    conda-forge
tk                        8.6.13          noxft_h4845f30_101    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
traits                    6.4.3           py312h98912ed_0    conda-forge
traitsui                  8.0.0              pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
utfcpp                    4.0.5                ha770c72_0    conda-forge
vtk                       9.3.0           osmesa_py312h1234567_100    conda-forge
vtk-base                  9.3.0           osmesa_py312h1234567_100    conda-forge
vtk-io-ffmpeg             9.3.0           osmesa_py312h1234567_100    conda-forge
wayland                   1.23.0               h5291e77_0    conda-forge
wayland-protocols         1.36                 hd8ed1ab_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
wslink                    2.1.1              pyhd8ed1ab_0    conda-forge
x264                      1!164.3095           h166bdaf_2    conda-forge
x265                      3.5                  h924138e_3    conda-forge
xcb-util                  0.4.1                hb711507_2    conda-forge
xcb-util-image            0.4.0                hb711507_2    conda-forge
xcb-util-keysyms          0.4.1                hb711507_0    conda-forge
xcb-util-renderutil       0.3.10               hb711507_0    conda-forge
xcb-util-wm               0.4.2                hb711507_0    conda-forge
xkeyboard-config          2.42                 h4ab18f5_0    conda-forge
xorg-damageproto          1.2.1             h7f98852_1002    conda-forge
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-glproto              1.4.17            h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.1.1                hd590300_0    conda-forge
xorg-libsm                1.2.4                h7391055_0    conda-forge
xorg-libx11               1.8.9                hb711507_1    conda-forge
xorg-libxau               1.0.11               hd590300_0    conda-forge
xorg-libxdamage           1.1.5                h7f98852_1    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h0b41bf4_2    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxrandr            1.5.2                h7f98852_1    conda-forge
xorg-libxrender           0.9.11               hd590300_0    conda-forge
xorg-libxt                1.3.0                hd590300_1    conda-forge
xorg-randrproto           1.5.0             h7f98852_1001    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-util-macros          1.19.3               h7f98852_0    conda-forge
xorg-xextproto            7.3.0             h0b41bf4_1003    conda-forge
xorg-xf86vidmodeproto     2.3.1             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
yarl                      1.9.4           py312h98912ed_0    conda-forge
yeadon                    1.5.0           py312h7900ff3_0    conda-forge
zipp                      3.19.2             pyhd8ed1ab_0    conda-forge
zlib                      1.3.1                h4ab18f5_1    conda-forge
zstd                      1.5.6                ha6fb4c9_0    conda-forge

Environment info

active environment : yeadon-test
    active env location : /home/moorepants/miniconda/envs/yeadon-test
            shell level : 1
       user config file : /home/moorepants/.condarc
 populated config files : /home/moorepants/.condarc
          conda version : 24.5.0
    conda-build version : 24.5.1
         python version : 3.11.9.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.5.0=0
                          __glibc=2.39=0
                          __linux=6.8.0=0
                          __unix=0=0
       base environment : /home/moorepants/miniconda  (writable)
      conda av data dir : /home/moorepants/miniconda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/moorepants/miniconda/pkgs
                          /home/moorepants/.conda/pkgs
       envs directories : /home/moorepants/miniconda/envs
                          /home/moorepants/.conda/envs
               platform : linux-64
             user-agent : conda/24.5.0 requests/2.32.3 CPython/3.11.9 Linux/6.8.0-36-generic ubuntu/24.04 glibc/2.39 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
                UID:GID : 1000:1000
             netrc file : /home/moorepants/.netrc
           offline mode : False
larsoner commented 4 months ago

Not 100% sure the right thing to do. VTK is now built against qt6-main, so you have to use it with PySide6 not PyQt (which is only available as PyQt5 at the moment). So personally I would conda install mayavi=*=pyside6_* vtk=*=qt* or so. But if you want you could get a PyQt5 variant with an older version of VTK as well if you wanted.

moorepants commented 4 months ago

vtk is a run dependency of mayavi in this feedstock, so I would expect installing mayavi (without any qualifiers) would work. It is also quite odd that conda install mayavi and conda install mayavi vtk result in different packages being installed for vtk, which is a dependency of mayavi.

But if you want you could get a PyQt5 variant with an older version of VTK as well if you wanted.

Doesn't' this then imply we need upper bounds on the vtk dependency in mayavi if pyqt5 is installed instead of pyside6?

larsoner commented 4 months ago

It is also quite odd that conda install mayavi and conda install mayavi vtk result in different packages being installed for vtk, which is a dependency of mayavi.

Agreed, this is arguably / maybe a conda solver bug, not sure why it would matter. Maybe because we depend on vtk-base rather than vtk, not sure.

Doesn't' this then imply we need upper bounds on the vtk dependency in mayavi if pyqt5 is installed instead of pyside6?

Depends on if you use the Qt parts of VTK or not. It's not likely that you do actually -- most people using Mayavi use its (python-based) vtk render window interactor rather than any Qt functionality actually provided by VTK itself.

The real reason you need the Qt version of VTK isn't for the Qt-based functionality -- it's because if you don't install that version you get the osmesa variant, which renders using offscreen MESA (hence the name).

So it is tempting to require vtk=*=qt or similar. I don't think you have to use mayavi with Qt -- you could use it with osmesa for example and set up a pipeline do some rendering and return. But it is a much more common use case to do it. So maybe the thing to do is have the pyqt and pyside variants require vtk=*=qt* versions of vtk, but then have an additional variant that just depends on vtk-base (and requires no Qt framework at all).

moorepants commented 4 months ago

Complex! I'm not so familiar with the inner workings of mayavi. I also use the vtk rendering in my app outside of the qt gui, so maybe I am also using the non-gui toolkit rendering too!