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

Error: datashader.bundling #14

Open
fcorowe opened this issue Aug 17, 2023 · 9 comments
Open

Error: datashader.bundling #14

fcorowe opened this issue Aug 17, 2023 · 9 comments
Labels
wontfix This will not be worked on

Comments

@fcorowe
Copy link

fcorowe commented Aug 17, 2023

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)
@schochastics
Copy link
Owner

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?

@fcorowe
Copy link
Author

fcorowe commented Aug 18, 2023

I did try both options - same result

@fcorowe
Copy link
Author

fcorowe commented Aug 18, 2023

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:

@fcorowe
Copy link
Author

fcorowe commented Aug 18, 2023

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.

@schochastics
Copy link
Owner

what happens when you run install_bundle_py?

@schochastics schochastics added the wontfix This will not be worked on label Dec 14, 2023
@prochlorothrix
Copy link

what happens when you run install_bundle_py?

I had the same issue on Ubuntu 22.04 and running install_bundle_py() fixed it.

@schochastics
Copy link
Owner

I'd recommend switching to ggraph for edgebundling. Most of the algorithms implemented here are now ported in a better way to that package

@fcorowe
Copy link
Author

fcorowe commented Jun 7, 2024

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?

@schochastics
Copy link
Owner

@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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants