Skip to content
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

Graphviz plugins not registered #3252

Open
2 tasks done
brynpickering opened this issue Mar 3, 2025 · 2 comments
Open
2 tasks done

Graphviz plugins not registered #3252

brynpickering opened this issue Mar 3, 2025 · 2 comments

Comments

@brynpickering
Copy link

brynpickering commented Mar 3, 2025

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Pixi (fails):

pixi init
pixi add graphviz
pixi run dot -v

Conda (succeeds):

conda create -n graphviz-test graphviz
conda activate graphviz-test
dot -v

Issue description

When installing graphviz from conda-forge using conda, the plugins are registered and it is possible to then save a .dot file to e.g. .png.

When installing graphviz from conda-forge using pixi, the plugins are not registered and the command dot -c must be run in the pixi environment shell before any graphviz operations are possible.

This extends to using pydot, which has graphviz as a dependency on conda-forge. dot_object.write_png(...) fails in a Python script if run within a pixi environment because dot -c must first be run in the shell.

Expected behavior

dot -v should return:

dot - graphviz version 12.2.1 (0)
libdir = "/path/to/.pixi/envs/default/lib/graphviz"
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.6.dylib
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
	/path/to/.pixi/envs/default/lib/graphviz/config6
		was successfully loaded.
    render	:  cairo dot dot_json fig gd json json0 map pic pov ps quartz svg svg_inline tk vrml xdot xdot_json
    layout	:  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout	:  textlayout
    device	:  bmp canon cgimage cmap cmapx cmapx_np dot dot_json eps exr fig gd gd2 gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg json json0 kitty kittyz pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svg_inline svgz tga tif tiff tk vrml vt vt-24bit vt-4up vt-6up vt-8up wbmp webp xdot xdot1.2 xdot1.4 xdot_json
    loadimage	:  (lib) bmp eps gd gd2 gif ico jpe jpeg jpg pdf png ps svg webp xbm
@ruben-arts
Copy link
Contributor

The help function of dot on my windows machine tells me I need to us -V instead of -v to get the version info.

❯ pixi run dot -V
dot - graphviz version 12.2.1 (0)

Might the version resolution be different between conda and pixi? (conda list vs pixi list)

Please note that pixi doesn't download from the defaults channel by default but is using the open-source conda-forge channel.

@brynpickering
Copy link
Author

I'm not aiming to get the version, but to print out the verbose plugin information (which fails if the plugins haven't been loaded). These plugins need to be loaded to do anything useful with graphviz.

My conda global config is already constrained to use only conda-forge, so my examples above are valid for that. In terms of version resolution, the packages and versions are identical:

conda list

# Name                    Version                   Build  Channel
adwaita-icon-theme        47.0                     unix_0    conda-forge
atk-1.0                   2.38.0               hd03087b_2    conda-forge
bzip2                     1.0.8                h99b78c6_7    conda-forge
cairo                     1.18.2               h6a3b0d2_1    conda-forge
epoxy                     1.5.10               h1c322ee_1    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_3    conda-forge
fontconfig                2.15.0               h1383a14_1    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               hadb7bae_2    conda-forge
fribidi                   1.0.10               h27ca646_0    conda-forge
gdk-pixbuf                2.42.12              h7ddc832_0    conda-forge
glib-tools                2.82.2               h1dc7a0c_1    conda-forge
graphite2                 1.3.13            hebf3989_1003    conda-forge
graphviz                  12.2.1               hff64154_1    conda-forge
gtk3                      3.24.43              he7bb075_3    conda-forge
gts                       0.7.6                he42f4ea_4    conda-forge
harfbuzz                  10.4.0               hb72c1af_0    conda-forge
hicolor-icon-theme        0.17                 hce30654_2    conda-forge
icu                       75.1                 hfee45f7_0    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libasprintf               0.23.1               h493aca8_0    conda-forge
libcxx                    19.1.7               ha82da77_0    conda-forge
libdeflate                1.23                 hec38601_0    conda-forge
libexpat                  2.6.4                h286801f_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgd                     2.3.3               hb2c3a21_11    conda-forge
libgettextpo              0.23.1               h493aca8_0    conda-forge
libglib                   2.82.2               hdff4504_1    conda-forge
libiconv                  1.18                 hfe07756_1    conda-forge
libintl                   0.23.1               h493aca8_0    conda-forge
libjpeg-turbo             3.0.0                hb547adb_1    conda-forge
liblzma                   5.6.4                h39f12f2_0    conda-forge
libpng                    1.6.47               h3783ad8_0    conda-forge
librsvg                   2.58.4               h266df6f_2    conda-forge
libtiff                   4.7.0                h551f018_3    conda-forge
libwebp-base              1.5.0                h2471fea_0    conda-forge
libxml2                   2.13.6               h178c5d8_0    conda-forge
libzlib                   1.3.1                h8359307_2    conda-forge
pango                     1.56.1               h73f1e88_0    conda-forge
pcre2                     10.44                h297a79d_2    conda-forge
pixman                    0.44.2               h2f9eb0b_0    conda-forge
zstd                      1.5.7                h6491c7d_1    conda-forge

pixi list

Package                    Version  Build          Size       Kind   Source
adwaita-icon-theme         47.0     unix_0         553.7 KiB  conda  adwaita-icon-theme
atk-1.0                    2.38.0   hd03087b_2     339.4 KiB  conda  atk-1.0
bzip2                      1.0.8    h99b78c6_7     120 KiB    conda  bzip2
cairo                      1.18.2   h6a3b0d2_1     873.6 KiB  conda  cairo
epoxy                      1.5.10   h1c322ee_1     346.9 KiB  conda  epoxy
font-ttf-dejavu-sans-mono  2.37     hab24e00_0     388.1 KiB  conda  font-ttf-dejavu-sans-mono
font-ttf-inconsolata       3.000    h77eed37_0     94.3 KiB   conda  font-ttf-inconsolata
font-ttf-source-code-pro   2.038    h77eed37_0     684.4 KiB  conda  font-ttf-source-code-pro
font-ttf-ubuntu            0.83     h77eed37_3     1.5 MiB    conda  font-ttf-ubuntu
fontconfig                 2.15.0   h1383a14_1     228.7 KiB  conda  fontconfig
fonts-conda-ecosystem      1        0              3.6 KiB    conda  fonts-conda-ecosystem
fonts-conda-forge          1        0              4 KiB      conda  fonts-conda-forge
freetype                   2.12.1   hadb7bae_2     582.5 KiB  conda  freetype
fribidi                    1.0.10   h27ca646_0     58.8 KiB   conda  fribidi
gdk-pixbuf                 2.42.12  h7ddc832_0     497.6 KiB  conda  gdk-pixbuf
glib-tools                 2.82.2   h1dc7a0c_1     98.6 KiB   conda  glib-tools
graphite2                  1.3.13   hebf3989_1003  77.9 KiB   conda  graphite2
graphviz                   12.2.1   hff64154_1     2.1 MiB    conda  graphviz
gtk3                       3.24.43  he7bb075_3     8.5 MiB    conda  gtk3
gts                        0.7.6    he42f4ea_4     297.2 KiB  conda  gts
harfbuzz                   10.3.0   hb72c1af_0     1.3 MiB    conda  harfbuzz
hicolor-icon-theme         0.17     hce30654_2     13.5 KiB   conda  hicolor-icon-theme
icu                        75.1     hfee45f7_0     11.3 MiB   conda  icu
lerc                       4.0.0    h9a09cb3_0     210.7 KiB  conda  lerc
libasprintf                0.23.1   h493aca8_0     40.7 KiB   conda  libasprintf
libcxx                     19.1.7   ha82da77_0     511.2 KiB  conda  libcxx
libdeflate                 1.23     hec38601_0     52.9 KiB   conda  libdeflate
libexpat                   2.6.4    h286801f_0     63.2 KiB   conda  libexpat
libffi                     3.4.2    h3422bc3_5     38.1 KiB   conda  libffi
libgd                      2.3.3    hb2c3a21_11    153.2 KiB  conda  libgd
libgettextpo               0.23.1   h493aca8_0     163 KiB    conda  libgettextpo
libglib                    2.82.2   hdff4504_1     3.5 MiB    conda  libglib
libiconv                   1.18     hfe07756_1     665.8 KiB  conda  libiconv
libintl                    0.23.1   h493aca8_0     77.1 KiB   conda  libintl
libjpeg-turbo              3.0.0    hb547adb_1     534.7 KiB  conda  libjpeg-turbo
liblzma                    5.6.4    h39f12f2_0     96.6 KiB   conda  liblzma
libpng                     1.6.47   h3783ad8_0     253.3 KiB  conda  libpng
librsvg                    2.58.4   h266df6f_2     4.5 MiB    conda  librsvg
libtiff                    4.7.0    h551f018_3     361.9 KiB  conda  libtiff
libwebp-base               1.5.0    h2471fea_0     283.2 KiB  conda  libwebp-base
libxml2                    2.13.6   h178c5d8_0     569.7 KiB  conda  libxml2
libzlib                    1.3.1    h8359307_2     45.3 KiB   conda  libzlib
pango                      1.56.1   h73f1e88_0     414 KiB    conda  pango
pcre2                      10.44    h297a79d_2     604.5 KiB  conda  pcre2
pixman                     0.44.2   h2f9eb0b_0     196.4 KiB  conda  pixman
zstd                       1.5.7    h6491c7d_1     390.6 KiB  conda  zstd

It shouldn't be necessary to configure the plugins manually (i.e., run dot -c). I expect that the plugin config is being written on install in both cases, but might be that it can't be found in the pixi env?

According to the dot help info, it is written to $prefix/lib/graphviz/config. I can see that in my conda env (/path/to/miniforge3/envs/graphviz-test/lib/graphviz/config6) but not in my pixi env (/path/to/.pixi/envs/default/lib/graphviz).

Only after I call pixi run dot -c do I get the config install in the pixi env (/path/to/.pixi/envs/default/lib/graphviz/config6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants