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

Runtime warning rpy2 image not found on macOS #47

Closed
axbazin opened this issue Dec 15, 2020 · 4 comments
Closed

Runtime warning rpy2 image not found on macOS #47

axbazin opened this issue Dec 15, 2020 · 4 comments

Comments

@axbazin
Copy link
Member

axbazin commented Dec 15, 2020

Hello,
If you have an error looking like the one down below, it means that there are problems with R and lapack. This has happened on macOS when installing with conda from time to time.

this happens when calling the --draw_hotspots of the spot subcommand, as such:

ppanggolin spot -p pangenome.h5 --cpu 1 --spot_graph --draw_hotspots

Using other versions of R / lapack could help. However I have failed to replicate this bug on actual macOS machines, this only happened on the CI workflow so far.
If you use macOS and this happens to you please add a comment with your specs and mode of install, and maybe hopefully I can do something about it.

/usr/local/miniconda/envs/test/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning:

Error: package or namespace load failed for ‘ade4’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib':
  dlopen(/usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib, 6): Library not loaded: @rpath/R/lib/libRlapack.dylib
  Referenced from: /usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib
  Reason: image not found


/usr/local/miniconda/envs/test/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning:

Failed with error:  

/usr/local/miniconda/envs/test/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning:

/usr/local/miniconda/envs/test/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning:

‘package ‘ade4’ could not be loaded’

/usr/local/miniconda/envs/test/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning:

/usr/local/miniconda/envs/test/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:146: RRuntimeWarning:

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib':
  dlopen(/usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib, 6): Library not loaded: @rpath/R/lib/libRlapack.dylib
  Referenced from: /usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib
  Reason: image not found


Traceback (most recent call last):
  File "/usr/local/miniconda/envs/test/bin/ppanggolin", line 8, in <module>
    sys.exit(main())
  File "/usr/local/miniconda/envs/test/lib/python3.6/site-packages/ppanggolin/main.py", line 208, in main
    ppanggolin.RGP.spot.launch(args)
  File "/usr/local/miniconda/envs/test/lib/python3.6/site-packages/ppanggolin/RGP/spot.py", line 459, in launch
    predictHotspots(pangenome, args.output, force=args.force, cpu = args.cpu, spot_graph=args.spot_graph, overlapping_match=args.overlapping_match, set_size=args.set_size, exact_match=args.exact_match_size, draw_hotspot=args.draw_hotspots, interest=args.interest, show_bar=args.show_prog_bars)
  File "/usr/local/miniconda/envs/test/lib/python3.6/site-packages/ppanggolin/RGP/spot.py", line 151, in predictHotspots
    draw_spots(drawn_spots, output, cpu, overlapping_match, exact_match, set_size, multigenics, elements, show_bar=show_bar)
  File "/usr/local/miniconda/envs/test/lib/python3.6/site-packages/ppanggolin/RGP/spot.py", line 446, in draw_spots
    spots_to_draw.append(drawCurrSpot(GeneLists, ordered_counts, elements, famcol, fname))#make R dataframes, and plot them using genoPlotR.
  File "/usr/local/miniconda/envs/test/lib/python3.6/site-packages/ppanggolin/RGP/spot.py", line 326, in drawCurrSpot
    importr("genoPlotR")
  File "/usr/local/miniconda/envs/test/lib/python3.6/site-packages/rpy2/robjects/packages.py", line 453, in importr
    env = _get_namespace(rname)
rpy2.rinterface.RRuntimeError: Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib':
  dlopen(/usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib, 6): Library not loaded: @rpath/R/lib/libRlapack.dylib
  Referenced from: /usr/local/miniconda/envs/test/lib/R/library/ade4/libs/ade4.dylib
  Reason: image not found```
@harish0201
Copy link

Not using a MacOS, but I faced this issue during installation of some other tool (gifrop) via conda.

I believe its due to channel priority that an incompatible version of rpy2 seems to get installed causing either library mismatch or installation failure.

@axbazin
Copy link
Member Author

axbazin commented Feb 1, 2021

Oh alright, that's good to know thank you !

@axbazin
Copy link
Member Author

axbazin commented Mar 8, 2021

If somebody has a message such a this one when using ppanggolin (and ends up reading this issue), know that it is very likely an installation issue. Changing versions or channel origin of rpy2 might help. In any case I can't do much about it.

@axbazin
Copy link
Member Author

axbazin commented Nov 23, 2021

latest commits have removed the dependencies with rpy2 and R, so this should not happen with the newer versions.

@axbazin axbazin closed this as completed Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants