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

Problem with installing due to the dependency magick #88

Open
EliHei2 opened this issue Nov 1, 2021 · 5 comments
Open

Problem with installing due to the dependency magick #88

EliHei2 opened this issue Nov 1, 2021 · 5 comments

Comments

@EliHei2
Copy link

EliHei2 commented Nov 1, 2021

Hi! apparently there is a new dependency magick added. I can not install it on my machine. the usual error:

1: In .inet_warning(msg) :installation of package ‘magick’ had non-zero exit status

any tricks?

@LTLA
Copy link
Contributor

LTLA commented Nov 1, 2021

My two cents: magick seems like one of those difficult system dependencies that should be shifted to the Suggests, given that it is not technically required for the definition of the SpatialExperiment class itself.

While it is required for the wrapper read10xVisium function, we could probably write a wrapper switch between magick, PNG and jpeg depending on what libraries are available on the user's machine.

See also comments at MarioniLab/MouseGastrulationData#16

@drighelli
Copy link
Owner

drighelli commented Nov 2, 2021

Thanks @EliHei2 for highlighting this at the moment the package depends on this library, so it's not possible to bypass this without installing the library on your machine.

Thanks @LTLA for the cross-reference and to highlight a possible solution:

  • about the Suggests: we can surely do this, but when the user invokes any function depending on magick, if there are no libraries, the problem will be always there.
  • I'd surely prefer to avoid any dependencies if there is a simpler possible solution, do you think that we can easily use PNG and jpeg instead of magick? I'd go for it on any machine at that point...

@LTLA
Copy link
Contributor

LTLA commented Nov 5, 2021

  • about the Suggests: we can surely do this, but when the user invokes any function depending on magick, if there are no libraries, the problem will be always there.

Yes, but at least you don't block users who just want to use the SpatialExperiment data structure. For example, if they already have LoadedSpatialImage objects, then the use of magick to handle loading is unnecessary.

  • I'd surely prefer to avoid any dependencies if there is a simpler possible solution, do you think that we can easily use PNG and jpeg instead of magick? I'd go for it on any machine at that point...

All of these have system dependences of some kind. PNG depends on libpng while jpeg depends on libjpeg. These may or may not be more likely to be installed. If you want to have maximum robustness, add all of them to Suggests and then switch between them at run time depending on what is installed.

@sciencepeak
Copy link

As per the error message prompt, I successfully installed the magick stuff to my linux system. Here is the command:
sudo apt-get install -y libmagick++-dev

On my windows system, I never encounter the magick-related issue.

@PeteHaitch
Copy link

PeteHaitch commented Nov 8, 2023

I'd like to add my voice that making magick a suggested dependency would be a very welcome improvement for the reasons outlined above by Aaron.

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

5 participants