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

libgvplugin_pango.so.6" - file not found #35

Closed
lilly-chen opened this issue Jun 24, 2019 · 12 comments
Closed

libgvplugin_pango.so.6" - file not found #35

lilly-chen opened this issue Jun 24, 2019 · 12 comments

Comments

@lilly-chen
Copy link

Issue:
when i tried to run the following: Image(graph.create_png())

it give me the following error:

InvocationException: Program terminated with status: 1. stderr follows: Warning: Could not load "/local/chelujin/anaconda3/lib/graphviz/libgvplugin_pango.so.6" - file not found
Warning: Could not load "/local/chelujin/anaconda3/lib/graphviz/libgvplugin_pango.so.6" - file not found
Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tk vml vmlz xdot xdot1.2 xdot1.4 xdot_json


Environment (conda list):
$ conda list

# packages in environment at /home/chelujin/anaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0                    py37_0  
alabaster                 0.7.12                   py37_0  
anaconda                  2019.03                  py37_0  
anaconda-client           1.7.2                    py37_0  
anaconda-navigator        1.9.7                    py37_0  
anaconda-project          0.8.2                    py37_0  
asn1crypto                0.24.0                   py37_0  
astroid                   2.2.5                    py37_0  
astropy                   3.1.2            py37h7b6447c_0  
atomicwrites              1.3.0                    py37_1  
attrs                     19.1.0                   py37_1  
babel                     2.6.0                    py37_0  
backcall                  0.1.0                    py37_0  
backports                 1.0                      py37_1  
backports.os              0.1.1                    py37_0  
backports.shutil_get_terminal_size 1.0.0                    py37_2  
beautifulsoup4            4.7.1                    py37_1  
bitarray                  0.8.3            py37h14c3975_0  
bkcharts                  0.2                      py37_0  
blas                      1.0                         mkl  
bleach                    3.1.0                    py37_0  
blosc                     1.15.0               hd408876_0  
bokeh                     1.0.4                    py37_0  
boto                      2.49.0                   py37_0  
bottleneck                1.2.1            py37h035aef0_1  
bzip2                     1.0.6                h14c3975_5  
ca-certificates           2019.1.23                     0  
cairo                     1.14.12              h8948797_3  
certifi                   2019.3.9                 py37_0    conda-forge
cffi                      1.12.2           py37h2e261b9_1  
chardet                   3.0.4                    py37_1  
click                     7.0                      py37_0  
cloudpickle               0.8.0                    py37_0  
clyent                    1.2.2                    py37_1  
colorama                  0.4.1                    py37_0  
conda                     4.7.4                    py37_0    conda-forge
conda-build               3.17.8                   py37_0  
conda-env                 2.6.0                         1  
conda-package-handling    1.3.9                    py37_0    conda-forge
conda-verify              3.1.1                    py37_0  
contextlib2               0.5.5                    py37_0  
cryptography              2.6.1            py37h1ba5d50_0  
curl                      7.64.0               hbc83047_2  
cycler                    0.10.0                   py37_0  
cython                    0.29.6           py37he6710b0_0  
cytoolz                   0.9.0.1          py37h14c3975_1  
dask                      1.1.4                    py37_1  
dask-core                 1.1.4                    py37_1  
dbus                      1.13.6               h746ee38_0  
decorator                 4.4.0                    py37_1  
defusedxml                0.5.0                    py37_1  
distributed               1.26.0                   py37_1  
docutils                  0.14                     py37_0  
entrypoints               0.3                      py37_0  
et_xmlfile                1.0.1                    py37_0  
expat                     2.2.6                he6710b0_0  
fastcache                 1.0.2            py37h14c3975_2  
filelock                  3.0.10                   py37_0  
flask                     1.0.2                    py37_1  
fontconfig                2.13.0               h9420a91_0  
freetype                  2.9.1                h8a8886c_1  
fribidi                   1.0.5                h7b6447c_0  
future                    0.17.1                   py37_0  
get_terminal_size         1.0.0                haa9412d_0  
gettext                   0.19.8.1             hd7bead4_3  
gevent                    1.4.0            py37h7b6447c_0  
glib                      2.56.2               hd408876_0  
glob2                     0.6                      py37_1  
gmp                       6.1.2                h6c8ec71_1  
gmpy2                     2.0.8            py37h10f8cd9_2  
graphite2                 1.3.13               h23475e2_0  
graphviz                  2.40.1               h21bd128_2  
greenlet                  0.4.15           py37h7b6447c_0  
gst-plugins-base          1.14.0               hbbd80ab_1  
gstreamer                 1.14.0               hb453b48_1  
h5py                      2.9.0            py37h7918eee_0  
harfbuzz                  1.8.8                hffaf4a1_0  
hdf5                      1.10.4               hb1b8bf9_0  
heapdict                  1.0.0                    py37_2  
html5lib                  1.0.1                    py37_0  
icu                       58.2                 h9c2bf20_1  
idna                      2.8                      py37_0  
imageio                   2.5.0                    py37_0  
imagesize                 1.1.0                    py37_0  
importlib_metadata        0.8                      py37_0  
intel-openmp              2019.3                      199  
ipykernel                 5.1.0            py37h39e3cac_0  
ipython                   7.4.0            py37h39e3cac_0  
ipython_genutils          0.2.0                    py37_0  
ipywidgets                7.4.2                    py37_0  
isort                     4.3.16                   py37_0  
itsdangerous              1.1.0                    py37_0  
jbig                      2.1                  hdba287a_0  
jdcal                     1.4                      py37_0  
jedi                      0.13.3                   py37_0  
jeepney                   0.4                      py37_0  
jinja2                    2.10                     py37_0  
jpeg                      9b                   h024ee3a_2  
jsonschema                3.0.1                    py37_0  
jupyter                   1.0.0                    py37_7  
jupyter_client            5.2.4                    py37_0  
jupyter_console           6.0.0                    py37_0  
jupyter_core              4.4.0                    py37_0  
jupyterlab                0.35.4           py37hf63ae98_0  
jupyterlab_server         0.2.0                    py37_0  
keyring                   18.0.0                   py37_0  
kiwisolver                1.0.1            py37hf484d3e_0  
krb5                      1.16.1               h173b8e3_7  
lazy-object-proxy         1.3.1            py37h14c3975_2  
libarchive                3.3.3                h5d8350f_5  
libcurl                   7.64.0               h20c2e04_2  
libedit                   3.1.20181209         hc058e9b_0  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 8.2.0                hdf63c60_1  
libgfortran-ng            7.3.0                hdf63c60_0  
liblief                   0.9.0                h7725739_2  
libpng                    1.6.36               hbc83047_0  
libsodium                 1.0.16               h1bed415_0  
libssh2                   1.8.0                h1ba5d50_4  
libstdcxx-ng              8.2.0                hdf63c60_1  
libtiff                   4.0.10               h2733197_2  
libtool                   2.4.6                h7b6447c_5  
libuuid                   1.0.3                h1bed415_2  
libxcb                    1.13                 h1bed415_1  
libxml2                   2.9.9                he19cac6_0  
libxslt                   1.1.33               h7d1a2b0_0  
llvmlite                  0.28.0           py37hd408876_0  
locket                    0.2.0                    py37_1  
lxml                      4.3.2            py37hefd8a0e_0  
lz4-c                     1.8.1.2              h14c3975_0  
lzo                       2.10                 h49e0be7_2  
markupsafe                1.1.1            py37h7b6447c_0  
matplotlib                3.0.3            py37h5429711_0  
mccabe                    0.6.1                    py37_1  
mistune                   0.8.4            py37h7b6447c_0  
mkl                       2019.3                      199  
mkl-service               1.1.2            py37he904b0f_5  
mkl_fft                   1.0.10           py37ha843d7b_0  
mkl_random                1.0.2            py37hd81dba3_0  
more-itertools            6.0.0                    py37_0  
mpc                       1.1.0                h10f8cd9_1  
mpfr                      4.0.1                hdf1c602_3  
mpmath                    1.1.0                    py37_0  
msgpack-python            0.6.1            py37hfd86e86_1  
multipledispatch          0.6.0                    py37_0  
navigator-updater         0.2.1                    py37_0  
nbconvert                 5.4.1                    py37_3  
nbformat                  4.4.0                    py37_0  
ncurses                   6.1                  he6710b0_1  
networkx                  2.2                      py37_1  
nltk                      3.4                      py37_1  
nose                      1.3.7                    py37_2  
notebook                  5.7.8                    py37_0  
numba                     0.43.1           py37h962f231_0  
numexpr                   2.6.9            py37h9e4a6bb_0  
numpy                     1.16.2           py37h7e9f1db_0  
numpy-base                1.16.2           py37hde5b4d6_0  
numpydoc                  0.8.0                    py37_0  
olefile                   0.46                     py37_0  
openpyxl                  2.6.1                    py37_1  
openssl                   1.1.1b               h7b6447c_1  
packaging                 19.0                     py37_0  
pandas                    0.24.2           py37he6710b0_0  
pandoc                    2.2.3.2                       0  
pandocfilters             1.4.2                    py37_1  
pango                     1.42.4               h049681c_0  
parso                     0.3.4                    py37_0  
partd                     0.3.10                   py37_1  
patchelf                  0.9                  he6710b0_3  
path.py                   11.5.0                   py37_0  
pathlib2                  2.3.3                    py37_0  
patsy                     0.5.1                    py37_0  
pcre                      8.43                 he6710b0_0  
pep8                      1.7.1                    py37_0  
pexpect                   4.6.0                    py37_0  
pickleshare               0.7.5                    py37_0  
pillow                    5.4.1            py37h34e0f95_0  
pip                       19.0.3                   py37_0  
pixman                    0.38.0               h7b6447c_0  
pkginfo                   1.5.0.1                  py37_0  
pluggy                    0.9.0                    py37_0  
ply                       3.11                     py37_0  
prometheus_client         0.6.0                    py37_0  
prompt_toolkit            2.0.9                    py37_0  
psutil                    5.6.1            py37h7b6447c_0  
ptyprocess                0.6.0                    py37_0  
py                        1.8.0                    py37_0  
py-lief                   0.9.0            py37h7725739_2  
py4j                      0.10.7                   pypi_0    pypi
pycodestyle               2.5.0                    py37_0  
pycosat                   0.6.3            py37h14c3975_0  
pycparser                 2.19                     py37_0  
pycrypto                  2.6.1            py37h14c3975_9  
pycurl                    7.43.0.2         py37h1ba5d50_0  
pydotplus                 2.0.2                      py_2    conda-forge
pyflakes                  2.1.1                    py37_0  
pygments                  2.3.1                    py37_0  
pylint                    2.3.1                    py37_0  
pyodbc                    4.0.26           py37he6710b0_0  
pyopenssl                 19.0.0                   py37_0  
pyparsing                 2.3.1                    py37_0  
pyqt                      5.9.2            py37h05f1152_2  
pyreadstat                0.2.5            py37h84994c4_0    conda-forge
pyrsistent                0.14.11          py37h7b6447c_0  
pysocks                   1.6.8                    py37_0  
pytables                  3.5.1            py37h71ec239_0  
pytest                    4.3.1                    py37_0  
pytest-arraydiff          0.3              py37h39e3cac_0  
pytest-astropy            0.5.0                    py37_0  
pytest-doctestplus        0.3.0                    py37_0  
pytest-openfiles          0.3.2                    py37_0  
pytest-remotedata         0.3.1                    py37_0  
python                    3.7.3                h0371630_0  
python-dateutil           2.8.0                    py37_0  
python-graphviz           0.10.1                     py_0  
python-libarchive-c       2.8                      py37_6  
pytz                      2018.9                   py37_0  
pywavelets                1.0.2            py37hdd07704_0  
pyyaml                    5.1              py37h7b6447c_0  
pyzmq                     18.0.0           py37he6710b0_0  
qt                        5.9.7                h5867ecd_1  
qtawesome                 0.5.7                    py37_1  
qtconsole                 4.4.3                    py37_0  
qtpy                      1.7.0                    py37_1  
readline                  7.0                  h7b6447c_5  
requests                  2.21.0                   py37_0  
rope                      0.12.0                   py37_0  
ruamel_yaml               0.15.46          py37h14c3975_0  
scikit-image              0.14.2           py37he6710b0_0  
scikit-learn              0.20.3           py37hd81dba3_0  
scipy                     1.2.1            py37h7c811a0_0  
seaborn                   0.9.0                    py37_0  
secretstorage             3.1.1                    py37_0  
send2trash                1.5.0                    py37_0  
setuptools                40.8.0                   py37_0  
simplegeneric             0.8.1                    py37_2  
singledispatch            3.4.0.3                  py37_0  
sip                       4.19.8           py37hf484d3e_0  
six                       1.12.0                   py37_0  
snappy                    1.1.7                hbae5bb6_3  
snowballstemmer           1.2.1                    py37_0  
sortedcollections         1.1.2                    py37_0  
sortedcontainers          2.1.0                    py37_0  
soupsieve                 1.8                      py37_0  
sphinx                    1.8.5                    py37_0  
sphinxcontrib             1.0                      py37_1  
sphinxcontrib-websupport  1.1.0                    py37_1  
spyder                    3.3.3                    py37_0  
spyder-kernels            0.4.2                    py37_0  
sqlalchemy                1.3.1            py37h7b6447c_0  
sqlite                    3.27.2               h7b6447c_0  
statsmodels               0.9.0            py37h035aef0_0  
sympy                     1.3                      py37_0  
tblib                     1.3.2                    py37_0  
terminado                 0.8.1                    py37_1  
testpath                  0.4.2                    py37_0  
tk                        8.6.8                hbc83047_0  
toolz                     0.9.0                    py37_0  
tornado                   6.0.2            py37h7b6447c_0  
tqdm                      4.31.1                   py37_1  
traitlets                 4.3.2                    py37_0  
unicodecsv                0.14.1                   py37_0  
unixodbc                  2.3.7                h14c3975_0  
urllib3                   1.24.1                   py37_0  
wcwidth                   0.1.7                    py37_0  
webencodings              0.5.1                    py37_1  
werkzeug                  0.14.1                   py37_0  
wheel                     0.33.1                   py37_0  
widgetsnbextension        3.4.2                    py37_0  
wrapt                     1.11.1           py37h7b6447c_0  
wurlitzer                 1.0.2                    py37_0  
xlrd                      1.2.0                    py37_0  
xlsxwriter                1.1.5                    py37_0  
xlwt                      1.3.0                    py37_0  
xorg-kbproto              1.0.7             h14c3975_1002    conda-forge
xorg-libice               1.0.9             h516909a_1004    conda-forge
xorg-libsm                1.2.2                h470a237_5    conda-forge
xorg-libx11               1.6.7             h14c3975_1000    conda-forge
xorg-libxext              1.3.4                h516909a_0    conda-forge
xorg-libxpm               3.5.12            h14c3975_1002    conda-forge
xorg-libxrender           0.9.10            h516909a_1002    conda-forge
xorg-libxt                1.1.5             h516909a_1003    conda-forge
xorg-renderproto          0.11.1            h14c3975_1002    conda-forge
xorg-xextproto            7.3.0             h14c3975_1002    conda-forge
xorg-xproto               7.0.31            h14c3975_1007    conda-forge
xz                        5.2.4                h14c3975_4  
yaml                      0.1.7                had09818_2  
zeromq                    4.3.1                he6710b0_3  
zict                      0.1.4                    py37_0  
zipp                      0.3.3                    py37_1  
zlib                      1.2.11               h7b6447c_3  
zstd                      1.3.7                h0b5b093_0 
</details>

<br/>
Details about  <code>conda</code> and system ( <code>conda info</code> ):
<details>

$ conda info
active environment : base
active env location : /home/chelujin/anaconda3
shell level : 1
user config file : /home/chelujin/.condarc
populated config files :
conda version : 4.7.4
conda-build version : 3.17.8
python version : 3.7.3.final.0
virtual packages :
base environment : /home/chelujin/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/chelujin/anaconda3/pkgs
/home/chelujin/.conda/pkgs
envs directories : /home/chelujin/anaconda3/envs
/home/chelujin/.conda/envs
platform : linux-64
user-agent : conda/4.7.4 requests/2.21.0 CPython/3.7.3 Linux/4.9.137-0.1.ac.218.74.329.metal1.x86_64 rhel/5.3 glibc/2.12
UID:GID : 9900902:100
netrc file : None
offline mode : False

@peterjc
Copy link
Contributor

peterjc commented Oct 12, 2020

Was this on macOS? Currently pango is declared as a Linux only dependency.

@mbargull
Copy link
Member

Yes, this is also happening on Linux (most likely in reduced containers) when libXau is not installed.
I've added a7e6ae0 to address this issue too.
Coincidentally, @FelixMoelder also reported the same issue a couple of hours ago to me.

@StrikerRUS
Copy link

Now the following error happens in pure Ubuntu Docker container.

Warning: Could not load "/root/miniconda/envs/test-env/lib/graphviz/libgvplugin_pango.so.6" - It was found, so perhaps one of its dependents was not.  Try ldd.
/root/.local/lib/python3.8/site-packages/lightgbm/plotting.py:617: in plot_tree
    s.write(graph.pipe(format='png'))
/root/miniconda/envs/test-env/lib/python3.8/site-packages/graphviz/files.py:169: in pipe
    out = backend.pipe(self._engine, format, data,
/root/miniconda/envs/test-env/lib/python3.8/site-packages/graphviz/backend.py:250: in pipe
    out, _ = run(cmd, input=data, capture_output=True, check=True, quiet=quiet)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = ['dot', '-Kdot', '-Tpng']
input = b'digraph {\n\tgraph [nodesep=0.05 rankdir=LR ranksep=0.3]\n\tsplit0 [label=<<B>Column_22</B> &#8804; <B>105.950</B><b...1 [label=yes]\n\tleaf2 [label=<leaf 2: <B>-0.175</B>>]\n\tsplit1 -> leaf2 [label=no]\n\tsplit0 -> split1 [label=no]\n}'
capture_output = True, check = True, encoding = None, quiet = False
kwargs = {'stderr': -1, 'stdin': -1, 'stdout': -1}
proc = <subprocess.Popen object at 0x7f0a80f7f250>, out = b''
err = b'Warning: Could not load "/root/miniconda/envs/test-env/lib/graphviz/libgvplugin_pango.so.6" - It was found, so perhaps one of its dependents was not.  Try ldd.\n'

    def run(cmd, input=None, capture_output=False, check=False, encoding=None,
            quiet=False, **kwargs):
        """Run the command described by cmd and return its (stdout, stderr) tuple."""
        log.debug('run %r', cmd)
    
        if input is not None:
            kwargs['stdin'] = subprocess.PIPE
            if encoding is not None:
                input = input.encode(encoding)
    
        if capture_output:
            kwargs['stdout'] = kwargs['stderr'] = subprocess.PIPE
    
        try:
            proc = subprocess.Popen(cmd, startupinfo=get_startupinfo(), **kwargs)
        except OSError as e:
            if e.errno == errno.ENOENT:
                raise ExecutableNotFound(cmd)
            else:
                raise
    
        out, err = proc.communicate(input)
    
        if not quiet and err:
            _compat.stderr_write_bytes(err, flush=True)
    
        if encoding is not None:
            if out is not None:
                out = out.decode(encoding)
            if err is not None:
                err = err.decode(encoding)
    
        if check and proc.returncode:
>           raise CalledProcessError(proc.returncode, cmd,
                                     output=out, stderr=err)
E           graphviz.backend.CalledProcessError: Command '['dot', '-Kdot', '-Tpng']' died with <Signals.SIGSEGV: 11>. [stderr: b'Warning: Could not load "/root/miniconda/envs/test-env/lib/graphviz/libgvplugin_pango.so.6" - It was found, so perhaps one of its dependents was not.  Try ldd.\n']

Installation command:

conda install -q -y \
    -n $CONDA_ENV \
    -c conda-forge \
        graphviz \
        python-graphviz

Env specs:

## Package Plan ##

  environment location: /root/miniconda/envs/test-env

  added / updated specs:
    - graphviz
    - python-graphviz


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2020.12.5  |       ha878542_0         137 KB  conda-forge
    cairo-1.16.0               |    h18b612c_1001         1.5 MB  conda-forge
    certifi-2020.12.5          |   py38h578d9bd_1         143 KB  conda-forge
    fribidi-1.0.10             |       h36c2ea0_0         112 KB  conda-forge
    gettext-0.19.8.1           |       h5e8e0c9_1         3.5 MB  conda-forge
    graphite2-1.3.13           |    h58526e2_1001         102 KB  conda-forge
    graphviz-2.42.3            |       h0511662_0         6.9 MB  conda-forge
    harfbuzz-2.4.0             |       h37c48d4_1         1.5 MB  conda-forge
    jpeg-9d                    |       h36c2ea0_0         264 KB  conda-forge
    libtool-2.4.6              |    h58526e2_1007         497 KB  conda-forge
    pango-1.42.4               |       h7062337_4         521 KB  conda-forge
    pixman-0.38.0              |    h516909a_1003         594 KB  conda-forge
    python-graphviz-0.16       |     pyhd3deb0d_1          20 KB  conda-forge
    python_abi-3.8             |           1_cp38           4 KB  conda-forge
    xorg-kbproto-1.0.7         |    h14c3975_1002          26 KB  conda-forge
    xorg-libice-1.0.10         |       h516909a_0          57 KB  conda-forge
    xorg-libsm-1.2.2           |       h470a237_5          24 KB  conda-forge
    xorg-libx11-1.6.12         |       h516909a_0         917 KB  conda-forge
    xorg-libxext-1.3.4         |       h516909a_0          51 KB  conda-forge
    xorg-libxpm-3.5.13         |       h516909a_0          63 KB  conda-forge
    xorg-libxrender-0.9.10     |    h516909a_1002          31 KB  conda-forge
    xorg-libxt-1.1.5           |    h516909a_1003         367 KB  conda-forge
    xorg-renderproto-0.11.1    |    h14c3975_1002           8 KB  conda-forge
    xorg-xextproto-7.3.0       |    h14c3975_1002          27 KB  conda-forge
    xorg-xproto-7.0.31         |    h14c3975_1007          72 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        17.4 MB

The following NEW packages will be INSTALLED:

  cairo              conda-forge/linux-64::cairo-1.16.0-h18b612c_1001
  fribidi            conda-forge/linux-64::fribidi-1.0.10-h36c2ea0_0
  gettext            conda-forge/linux-64::gettext-0.19.8.1-h5e8e0c9_1
  graphite2          conda-forge/linux-64::graphite2-1.3.13-h58526e2_1001
  graphviz           conda-forge/linux-64::graphviz-2.42.3-h0511662_0
  harfbuzz           conda-forge/linux-64::harfbuzz-2.4.0-h37c48d4_1
  libtool            conda-forge/linux-64::libtool-2.4.6-h58526e2_1007
  pango              conda-forge/linux-64::pango-1.42.4-h7062337_4
  pixman             conda-forge/linux-64::pixman-0.38.0-h516909a_1003
  python-graphviz    conda-forge/noarch::python-graphviz-0.16-pyhd3deb0d_1
  python_abi         conda-forge/linux-64::python_abi-3.8-1_cp38
  xorg-kbproto       conda-forge/linux-64::xorg-kbproto-1.0.7-h14c3975_1002
  xorg-libice        conda-forge/linux-64::xorg-libice-1.0.10-h516909a_0
  xorg-libsm         conda-forge/linux-64::xorg-libsm-1.2.2-h470a237_5
  xorg-libx11        conda-forge/linux-64::xorg-libx11-1.6.12-h516909a_0
  xorg-libxext       conda-forge/linux-64::xorg-libxext-1.3.4-h516909a_0
  xorg-libxpm        conda-forge/linux-64::xorg-libxpm-3.5.13-h516909a_0
  xorg-libxrender    conda-forge/linux-64::xorg-libxrender-0.9.10-h516909a_1002
  xorg-libxt         conda-forge/linux-64::xorg-libxt-1.1.5-h516909a_1003
  xorg-renderproto   conda-forge/linux-64::xorg-renderproto-0.11.1-h14c3975_1002
  xorg-xextproto     conda-forge/linux-64::xorg-xextproto-7.3.0-h14c3975_1002
  xorg-xproto        conda-forge/linux-64::xorg-xproto-7.0.31-h14c3975_1007

The following packages will be UPDATED:

  certifi            pkgs/main::certifi-2020.12.5-py38h06a~ --> conda-forge::certifi-2020.12.5-py38h578d9bd_1
  jpeg                        pkgs/main::jpeg-9b-h024ee3a_2 --> conda-forge::jpeg-9d-h36c2ea0_0

The following packages will be SUPERSEDED by a higher-priority channel:

  ca-certificates    pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-ha878542_0

@nehaljwani
Copy link
Member

@StrikerRUS Please try updating to graphviz=2.46.1

@StrikerRUS
Copy link

@nehaljwani Thanks a lot for the prompt response!
Now it is failing during the installation phase:

## Package Plan ##

  environment location: /root/miniconda/envs/test-env

  added / updated specs:
    - graphviz=2.46.1
    - python-graphviz


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |      conda_forge           3 KB  conda-forge
    _openmp_mutex-4.5          |            1_gnu          22 KB  conda-forge
    atk-1.0-2.36.0             |       h3371d22_4         560 KB  conda-forge
    ca-certificates-2020.12.5  |       ha878542_0         137 KB  conda-forge
    cairo-1.16.0               |    h7979940_1007         1.5 MB  conda-forge
    certifi-2020.12.5          |   py38h578d9bd_1         143 KB  conda-forge
    font-ttf-dejavu-sans-mono-2.37|       hab24e00_0         388 KB  conda-forge
    font-ttf-inconsolata-2.001 |       hab24e00_0          97 KB  conda-forge
    font-ttf-source-code-pro-2.030|       hab24e00_0         927 KB  conda-forge
    font-ttf-ubuntu-0.83       |       hab24e00_0         1.9 MB  conda-forge
    fonts-conda-ecosystem-1    |                0           4 KB  conda-forge
    fonts-conda-forge-1        |                0           4 KB  conda-forge
    fribidi-1.0.10             |       h36c2ea0_0         112 KB  conda-forge
    gdk-pixbuf-2.42.2          |       h0c95a7a_2         611 KB  conda-forge
    gettext-0.19.8.1           |    h0b5b191_1005         3.6 MB  conda-forge
    giflib-5.2.1               |       h36c2ea0_2          77 KB  conda-forge
    glib-2.66.7                |       h9c3ff4c_0         441 KB  conda-forge
    glib-tools-2.66.7          |       h9c3ff4c_0          85 KB  conda-forge
    graphite2-1.3.13           |    h58526e2_1001         102 KB  conda-forge
    graphviz-2.46.1            |       h93c640b_4         6.5 MB  conda-forge
    gst-plugins-base-1.14.5    |       h0935bb2_2         6.8 MB  conda-forge
    gstreamer-1.18.3           |       h3560a44_0         2.0 MB  conda-forge
    gtk2-2.24.33               |       hab0c2f8_0         7.3 MB  conda-forge
    gts-0.7.6                  |       h64030ff_2         411 KB  conda-forge
    harfbuzz-2.7.4             |       h5cf4720_0         1.9 MB  conda-forge
    icu-68.1                   |       h58526e2_0        13.0 MB  conda-forge
    jpeg-9d                    |       h36c2ea0_0         264 KB  conda-forge
    krb5-1.17.2                |       h926e7f8_0         1.4 MB  conda-forge
    libclang-11.0.1            |default_ha53f305_1        19.2 MB  conda-forge
    libevent-2.1.10            |       hcdb4288_3         1.1 MB  conda-forge
    libgcc-ng-9.3.0            |      h2828fa1_18         7.8 MB  conda-forge
    libgd-2.3.0                |       h47910db_1         297 KB  conda-forge
    libglib-2.66.7             |       h1f3bc88_0         3.0 MB  conda-forge
    libgomp-9.3.0              |      h2828fa1_18         376 KB  conda-forge
    libiconv-1.16              |       h516909a_0         1.4 MB  conda-forge
    libllvm11-11.0.1           |       hf817b99_0        29.1 MB  conda-forge
    libpq-12.3                 |       h255efa7_3         2.6 MB  conda-forge
    librsvg-2.50.3             |       hfa39831_1        16.8 MB  conda-forge
    libstdcxx-ng-9.3.0         |      h6de172a_18         4.0 MB  conda-forge
    libtool-2.4.6              |    h58526e2_1007         497 KB  conda-forge
    libwebp-1.1.0              |       h76fa15c_4          84 KB  conda-forge
    libwebp-base-1.1.0         |       h36c2ea0_3         864 KB  conda-forge
    libxkbcommon-1.0.3         |       he3ba5ed_0         581 KB  conda-forge
    libxml2-2.9.10             |       h72842e0_3         1.3 MB  conda-forge
    mysql-common-8.0.22        |       ha770c72_1         1.5 MB  conda-forge
    mysql-libs-8.0.22          |       h1fd7589_1         1.7 MB  conda-forge
    nspr-4.29                  |       h9c3ff4c_1         232 KB  conda-forge
    nss-3.62                   |       hb5efdd6_0         2.1 MB  conda-forge
    openssl-1.1.1j             |       h7f98852_0         2.1 MB  conda-forge
    pango-1.42.4               |       h69149e4_5         533 KB  conda-forge
    pixman-0.40.0              |       h36c2ea0_0         627 KB  conda-forge
    pyqt-5.12.3                |   py38h578d9bd_7          21 KB  conda-forge
    pyqt-impl-5.12.3           |   py38h7400c14_7         5.9 MB  conda-forge
    pyqt5-sip-4.19.18          |   py38h709712a_7         310 KB  conda-forge
    pyqtchart-5.12             |   py38h7400c14_7         257 KB  conda-forge
    pyqtwebengine-5.12.1       |   py38h7400c14_7         175 KB  conda-forge
    python-graphviz-0.16       |     pyh243d235_2          20 KB  conda-forge
    python_abi-3.8             |           1_cp38           4 KB  conda-forge
    qt-5.12.9                  |       h9d6b050_2        99.5 MB  conda-forge
    sqlite-3.34.0              |       h74cdb3f_0         1.4 MB  conda-forge
    xorg-kbproto-1.0.7         |    h7f98852_1002          27 KB  conda-forge
    xorg-libice-1.0.10         |       h516909a_0          57 KB  conda-forge
    xorg-libsm-1.2.2           |       h470a237_5          24 KB  conda-forge
    xorg-libx11-1.6.12         |       h516909a_0         917 KB  conda-forge
    xorg-libxext-1.3.4         |       h516909a_0          51 KB  conda-forge
    xorg-libxrender-0.9.10     |    h516909a_1002          31 KB  conda-forge
    xorg-renderproto-0.11.1    |    h14c3975_1002           8 KB  conda-forge
    xorg-xextproto-7.3.0       |    h7f98852_1002          28 KB  conda-forge
    xorg-xproto-7.0.31         |    h7f98852_1007          73 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       256.6 MB

The following NEW packages will be INSTALLED:

  _openmp_mutex      conda-forge/linux-64::_openmp_mutex-4.5-1_gnu
  atk-1.0            conda-forge/linux-64::atk-1.0-2.36.0-h3371d22_4
  cairo              conda-forge/linux-64::cairo-1.16.0-h7979940_1007
  font-ttf-dejavu-s~ conda-forge/noarch::font-ttf-dejavu-sans-mono-2.37-hab24e00_0
  font-ttf-inconsol~ conda-forge/noarch::font-ttf-inconsolata-2.001-hab24e00_0
  font-ttf-source-c~ conda-forge/noarch::font-ttf-source-code-pro-2.030-hab24e00_0
  font-ttf-ubuntu    conda-forge/noarch::font-ttf-ubuntu-0.83-hab24e00_0
  fonts-conda-ecosy~ conda-forge/noarch::fonts-conda-ecosystem-1-0
  fonts-conda-forge  conda-forge/noarch::fonts-conda-forge-1-0
  fribidi            conda-forge/linux-64::fribidi-1.0.10-h36c2ea0_0
  gdk-pixbuf         conda-forge/linux-64::gdk-pixbuf-2.42.2-h0c95a7a_2
  gettext            conda-forge/linux-64::gettext-0.19.8.1-h0b5b191_1005
  giflib             conda-forge/linux-64::giflib-5.2.1-h36c2ea0_2
  glib-tools         conda-forge/linux-64::glib-tools-2.66.7-h9c3ff4c_0
  graphite2          conda-forge/linux-64::graphite2-1.3.13-h58526e2_1001
  graphviz           conda-forge/linux-64::graphviz-2.46.1-h93c640b_4
  gtk2               conda-forge/linux-64::gtk2-2.24.33-hab0c2f8_0
  gts                conda-forge/linux-64::gts-0.7.6-h64030ff_2
  harfbuzz           conda-forge/linux-64::harfbuzz-2.7.4-h5cf4720_0
  krb5               conda-forge/linux-64::krb5-1.17.2-h926e7f8_0
  libclang           conda-forge/linux-64::libclang-11.0.1-default_ha53f305_1
  libevent           conda-forge/linux-64::libevent-2.1.10-hcdb4288_3
  libgd              conda-forge/linux-64::libgd-2.3.0-h47910db_1
  libglib            conda-forge/linux-64::libglib-2.66.7-h1f3bc88_0
  libgomp            conda-forge/linux-64::libgomp-9.3.0-h2828fa1_18
  libiconv           conda-forge/linux-64::libiconv-1.16-h516909a_0
  libllvm11          conda-forge/linux-64::libllvm11-11.0.1-hf817b99_0
  libpq              conda-forge/linux-64::libpq-12.3-h255efa7_3
  librsvg            conda-forge/linux-64::librsvg-2.50.3-hfa39831_1
  libtool            conda-forge/linux-64::libtool-2.4.6-h58526e2_1007
  libwebp            conda-forge/linux-64::libwebp-1.1.0-h76fa15c_4
  libwebp-base       conda-forge/linux-64::libwebp-base-1.1.0-h36c2ea0_3
  libxkbcommon       conda-forge/linux-64::libxkbcommon-1.0.3-he3ba5ed_0
  mysql-common       conda-forge/linux-64::mysql-common-8.0.22-ha770c72_1
  mysql-libs         conda-forge/linux-64::mysql-libs-8.0.22-h1fd7589_1
  nspr               conda-forge/linux-64::nspr-4.29-h9c3ff4c_1
  nss                conda-forge/linux-64::nss-3.62-hb5efdd6_0
  pango              conda-forge/linux-64::pango-1.42.4-h69149e4_5
  pixman             conda-forge/linux-64::pixman-0.40.0-h36c2ea0_0
  pyqt-impl          conda-forge/linux-64::pyqt-impl-5.12.3-py38h7400c14_7
  pyqt5-sip          conda-forge/linux-64::pyqt5-sip-4.19.18-py38h709712a_7
  pyqtchart          conda-forge/linux-64::pyqtchart-5.12-py38h7400c14_7
  pyqtwebengine      conda-forge/linux-64::pyqtwebengine-5.12.1-py38h7400c14_7
  python-graphviz    conda-forge/noarch::python-graphviz-0.16-pyh243d235_2
  python_abi         conda-forge/linux-64::python_abi-3.8-1_cp38
  xorg-kbproto       conda-forge/linux-64::xorg-kbproto-1.0.7-h7f98852_1002
  xorg-libice        conda-forge/linux-64::xorg-libice-1.0.10-h516909a_0
  xorg-libsm         conda-forge/linux-64::xorg-libsm-1.2.2-h470a237_5
  xorg-libx11        conda-forge/linux-64::xorg-libx11-1.6.12-h516909a_0
  xorg-libxext       conda-forge/linux-64::xorg-libxext-1.3.4-h516909a_0
  xorg-libxrender    conda-forge/linux-64::xorg-libxrender-0.9.10-h516909a_1002
  xorg-renderproto   conda-forge/linux-64::xorg-renderproto-0.11.1-h14c3975_1002
  xorg-xextproto     conda-forge/linux-64::xorg-xextproto-7.3.0-h7f98852_1002
  xorg-xproto        conda-forge/linux-64::xorg-xproto-7.0.31-h7f98852_1007

The following packages will be UPDATED:

  certifi            pkgs/main::certifi-2020.12.5-py38h06a~ --> conda-forge::certifi-2020.12.5-py38h578d9bd_1
  gst-plugins-base   pkgs/main::gst-plugins-base-1.14.0-h8~ --> conda-forge::gst-plugins-base-1.14.5-h0935bb2_2
  gstreamer          pkgs/main::gstreamer-1.14.0-h28cd5cc_2 --> conda-forge::gstreamer-1.18.3-h3560a44_0
  icu                        pkgs/main::icu-58.2-he6710b0_3 --> conda-forge::icu-68.1-h58526e2_0
  jpeg                        pkgs/main::jpeg-9b-h024ee3a_2 --> conda-forge::jpeg-9d-h36c2ea0_0
  libgcc-ng           pkgs/main::libgcc-ng-9.1.0-hdf63c60_0 --> conda-forge::libgcc-ng-9.3.0-h2828fa1_18
  libstdcxx-ng       pkgs/main::libstdcxx-ng-9.1.0-hdf63c6~ --> conda-forge::libstdcxx-ng-9.3.0-h6de172a_18
  pyqt                 pkgs/main::pyqt-5.9.2-py38h05f1152_4 --> conda-forge::pyqt-5.12.3-py38h578d9bd_7
  qt                         pkgs/main::qt-5.9.7-h5867ecd_1 --> conda-forge::qt-5.12.9-h9d6b050_2
  sqlite                pkgs/main::sqlite-3.33.0-h62c20be_0 --> conda-forge::sqlite-3.34.0-h74cdb3f_0

The following packages will be SUPERSEDED by a higher-priority channel:

  _libgcc_mutex           pkgs/main::_libgcc_mutex-0.1-main --> conda-forge::_libgcc_mutex-0.1-conda_forge
  ca-certificates    pkgs/main::ca-certificates-2021.1.19-~ --> conda-forge::ca-certificates-2020.12.5-ha878542_0
  glib                    pkgs/main::glib-2.67.4-h36276a3_1 --> conda-forge::glib-2.66.7-h9c3ff4c_0
  libxml2              pkgs/main::libxml2-2.9.10-hb55368b_3 --> conda-forge::libxml2-2.9.10-h72842e0_3
  openssl              pkgs/main::openssl-1.1.1j-h27cfd23_0 --> conda-forge::openssl-1.1.1j-h7f98852_0


Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... g_module_open() failed for /root/miniconda/envs/test-env/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: libXau.so.6: cannot open shared object file: No such file or directory

g_module_open() failed for /root/miniconda/envs/test-env/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: libXau.so.6: cannot open shared object file: No such file or directory

Command to install:

conda install -q -y \
    -n $CONDA_ENV \
    -c conda-forge \
        "graphviz=2.46.1" \
        python-graphviz

@jakirkham
Copy link
Member

libXau comes from the system package manager. So would make sure that is installed there

@nehaljwani
Copy link
Member

nehaljwani commented Feb 26, 2021

@StrikerRUS The following works for me:

$ sudo docker run -v$HOME:/base_home --rm -it ubuntu:latest /bin/bash

root@0c38ad9ac566:/# /base_home/conda-latest-linux-64.exe create -yp ./dev -c conda-forge python-graphviz graphviz

root@0c38ad9ac566:/# ./dev/bin/dot -Kdot -Tpng -o sample.png <(echo digraph G {a->b})

root@0c38ad9ac566:/# /base_home/conda-latest-linux-64.exe list -p ./dev/ -e
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
_libgcc_mutex=0.1=conda_forge
_openmp_mutex=4.5=1_gnu
atk-1.0=2.36.0=h3371d22_4
ca-certificates=2020.12.5=ha878542_0
cairo=1.16.0=h7979940_1007
certifi=2020.12.5=py39hf3d152e_1
expat=2.2.10=h9c3ff4c_0
font-ttf-dejavu-sans-mono=2.37=hab24e00_0
font-ttf-inconsolata=2.001=hab24e00_0
font-ttf-source-code-pro=2.030=hab24e00_0
font-ttf-ubuntu=0.83=hab24e00_0
fontconfig=2.13.1=hba837de_1004
fonts-conda-ecosystem=1=0
fonts-conda-forge=1=0
freetype=2.10.4=h0708190_1
fribidi=1.0.10=h36c2ea0_0
gdk-pixbuf=2.42.2=h0c95a7a_2
gettext=0.19.8.1=h0b5b191_1005
giflib=5.2.1=h36c2ea0_2
graphite2=1.3.13=h58526e2_1001
graphviz=2.46.1=h93c640b_4
gtk2=2.24.33=hab0c2f8_0
gts=0.7.6=h64030ff_2
harfbuzz=2.7.4=h5cf4720_0
icu=68.1=h58526e2_0
jpeg=9d=h36c2ea0_0
ld_impl_linux-64=2.35.1=hea4e1c9_2
libffi=3.3=h58526e2_2
libgcc-ng=9.3.0=h2828fa1_18
libgd=2.3.0=h47910db_1
libglib=2.66.7=h1f3bc88_0
libgomp=9.3.0=h2828fa1_18
libiconv=1.16=h516909a_0
libpng=1.6.37=h21135ba_2
librsvg=2.50.3=hfa39831_1
libstdcxx-ng=9.3.0=h6de172a_18
libtiff=4.2.0=hdc55705_0
libtool=2.4.6=h58526e2_1007
libuuid=2.32.1=h7f98852_1000
libwebp=1.2.0=h3452ae3_0
libwebp-base=1.2.0=h7f98852_0
libxcb=1.13=h7f98852_1003
libxml2=2.9.10=h72842e0_3
lz4-c=1.9.3=h9c3ff4c_0
ncurses=6.2=h58526e2_4
openssl=1.1.1j=h7f98852_0
pango=1.42.4=h69149e4_5
pcre=8.44=he1b5a44_0
pip=21.0.1=pyhd8ed1ab_0
pixman=0.40.0=h36c2ea0_0
pthread-stubs=0.4=h36c2ea0_1001
python=3.9.2=hffdb5ce_0_cpython
python-graphviz=0.16=pyh243d235_2
python_abi=3.9=1_cp39
readline=8.0=he28a2e2_2
setuptools=49.6.0=py39hf3d152e_3
sqlite=3.34.0=h74cdb3f_0
tk=8.6.10=h21135ba_1
tzdata=2021a=he74cb21_0
wheel=0.36.2=pyhd3deb0d_0
xorg-kbproto=1.0.7=h7f98852_1002
xorg-libice=1.0.10=h516909a_0
xorg-libsm=1.2.3=h84519dc_1000
xorg-libx11=1.6.12=h516909a_0
xorg-libxau=1.0.9=h7f98852_0
xorg-libxdmcp=1.1.3=h7f98852_0
xorg-libxext=1.3.4=h516909a_0
xorg-libxrender=0.9.10=h516909a_1002
xorg-renderproto=0.11.1=h14c3975_1002
xorg-xextproto=7.3.0=h7f98852_1002
xorg-xproto=7.0.31=h7f98852_1007
xz=5.2.5=h516909a_1
zlib=1.2.11=h516909a_1010
zstd=1.4.8=ha95c52a_1

In your environment, for whatever reason, xorg-libxau isn't being pulled in. Let's see why I am pulling it in:

# What requires libXau? Ans: libxcb-shm.so
root@0c38ad9ac566:/# LD_DEBUG=all ldd ./dev/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so 2>&1 | grep file=libXau | grep needed
       899:     file=libXau.so.6 [0];  needed by /./dev/lib/gdk-pixbuf-2.0/2.10.0/loaders/../../.././libxcb-shm.so.0 [0]

# What provides libxcb-shm.so? Ans: libxcb-1.13
root@0c38ad9ac566:/# grep libxcb-shm.so ./dev/conda-meta/* -l
./dev/conda-meta/libxcb-1.13-h7f98852_1003.json

# What requires libxcb? Ans: cairo and xorg-libx11
root@0c38ad9ac566:/# grep libxcb ./dev/conda-meta/* | grep -v libxcb-
./dev/conda-meta/cairo-1.16.0-h7979940_1007.json:    "libxcb",
./dev/conda-meta/xorg-libx11-1.6.12-h516909a_0.json:    "libxcb 1.*",

# What requires cairo and xorg-libx11? 
I hope you can go from here ...

Basically, conda is trying to minimize the number of changes required to your environment and isn't pulling (latest of) everything. Try installing graphviz in a new environment and compare what you are missing.

@nehaljwani
Copy link
Member

nehaljwani commented Feb 26, 2021

@StrikerRUS My hunch is that you have a very old build of libxcb installed in your current environment. Try updating it to the latest build: libxcb=1.13 and then install python-pygraphviz and graphviz=2.46.1

@nehaljwani
Copy link
Member

I've reported the loose dependency on libxcb which is causing problems at conda-forge/cairo-feedstock#59 and conda-forge/xorg-libx11-feedstock#24

@StrikerRUS
Copy link

@nehaljwani Wow, awesome debugging!

Right now we are using workaround with explicit installation of xorg-libxau
https://github.com/microsoft/LightGBM/blob/6356e659af74909aa77eb87d54b79f0373772509/.ci/test.sh#L103-L107

Try updating it to the latest build: libxcb=1.13 ...

We have libxcb-1.14-h7b6447c_0 from the default conda channel

libxcb             pkgs/main/linux-64::libxcb-1.14-h7b6447c_0

I've reported the loose dependency on libxcb ...

Thanks a lot for filling out issues in the upstream repos!

@nehaljwani
Copy link
Member

@StrikerRUS The libxcb builds in the main channel do not use the xorg-* conda packages. They rely on the system package manager to provide them.

@pkgw
Copy link
Contributor

pkgw commented Feb 26, 2021

I think that what's going on here is that some unique characteristics of conda-forge have made this issue confusing, but I don't believe that any upstream changes are needed.

As has been mentioned, the default assumption of Conda Linux builds is the libXau is provided by the underlying operating system. So the recommended solution — and the only solution if one were using defaults without conda-forge — would be to install libXau at the OS level rather than the Conda level.

Things get a bit confusing because conda-forge does provide xorg-libxau, and some conda-forge packages require it. But not all of them do, and things have always been a bit inconsistent from package to package. (My oldest open pull request is an unfinished attempt at writing up a policy.) Qualitatively, I believe that the trend is that more packages are not listing dependencies on xorg-libxau as conda-forge's recipes become more closely aligned with those in the defaults channel. So it is possible to get away without installing libXau at the OS level ... but for reliable results, you should either install libXau at the OS level, or always explicitly install xorg-libxau.

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

7 participants