edgebundle
edgebundle copied to clipboard
Error: datashader.bundling
Thanks for the package. The maps look awesome.
I am having a problem running the code provided on the website. Specifically I am struggling to run the following line:
hbundle <- edge_bundle_hammer(g, xy, bw = 0.7, decay = 0.5)
It returns this error:
Error: Python module datashader.bundling was not found.
I checked I have this datashader
installed and it is:
(flowmap) MacBook-Pro-5:flow-map_edgebundle franciscorowe$ conda list
# packages in environment at /Users/franciscorowe/opt/anaconda3/envs/flowmap:
#
# Name Version Build Channel
brotli 1.0.9 pypi_0 pypi
brotli-python 1.0.9 py311h814d153_9 conda-forge
bzip2 1.0.8 h0d85af4_4 conda-forge
ca-certificates 2023.7.22 h8857fd0_0 conda-forge
certifi 2023.7.22 pyhd8ed1ab_0 conda-forge
charset-normalizer 3.2.0 pyhd8ed1ab_0 conda-forge
click 8.1.6 unix_pyh707e725_0 conda-forge
cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge
colorcet 3.0.1 pyhd8ed1ab_0 conda-forge
dask-core 2023.8.0 pyhd8ed1ab_0 conda-forge
**datashader** 0.15.2 pyhd8ed1ab_0 conda-forge
....
Yet, I get the same error when I run the line of code above.
Any advice on this issue would be appreciated, or general advice on how to get the package working.
My computational set up is:
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
Debugging datashader is always tricky for me. Did you use the automatic install shown here: https://github.com/schochastics/edgebundle/blob/main/R/bundle_hammer.R#L62-L68
Or did you install it manually?
I did try both options - same result
This is the message I get:
hbundle <- edge_bundle_hammer(g, xy, bw = 0.7, decay = 0.5)
List of 20
$ python : chr "/usr/bin/python3"
$ libpython : chr "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/config-3.9-"| __truncated__
$ pythonhome : chr "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9:/Library/Developer/Comman"| __truncated__
$ pythonpath : chr "/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/reticulate/config:/Library/Developer/Comma"| __truncated__
$ prefix : chr "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9"
$ exec_prefix : chr "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9"
$ base_exec_prefix : chr "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9"
$ virtualenv : chr ""
$ virtualenv_activate : chr ""
$ version_string : chr "3.9.6 (default, May 7 2023, 23:32:44) [Clang 14.0.3 (clang-1403.0.22.14.1)]"
$ version : chr "3.9"
$ architecture : chr "64bit"
$ anaconda : logi FALSE
$ conda : chr "False"
$ numpy : NULL
$ required_module : chr "datashader"
$ required_module_path: NULL
$ available : logi TRUE
$ python_versions : chr "/usr/bin/python3"
$ forced : chr "RETICULATE_PYTHON_FALLBACK"
- attr(*, "class")= chr "py_config"
Error: Python module datashader.bundling was not found.
Detected Python configuration:
Also I tried it two machines: a Mac Studio, and a Mac Pro. The output above is from the Mac Studio which I trust less as I can't list the modules that are installed on the version of Python. Nonetheless, I can't get the package to work on my Mac Pro either.
what happens when you run install_bundle_py
?
what happens when you run
install_bundle_py
?
I had the same issue on Ubuntu 22.04 and running install_bundle_py()
fixed it.
I'd recommend switching to ggraph for edgebundling. Most of the algorithms implemented here are now ported in a better way to that package
Hi @schochastics, could you please elaborate on what exactly is the suggestion. Is it to use this package: https://ggraph.data-imaginist.com/reference/geom_conn_bundle.html instead of yours?
@fcorowe Yes, most functionality was ported to ggraph and is available under geom_edge_bundle_*
see the release blog post: https://www.data-imaginist.com/posts/2024-02-15-ggraph-2-2-0/