Code Monkey home page Code Monkey logo

Comments (10)

ethanbass avatar ethanbass commented on September 26, 2024 1

I don't know if you already solved this issue, but you likely have openbabel installed in a different directory. Try opening your terminal and typing where obabel,
then you can trace down the library it is looking for and symlink it into the directory where R is expecting to find it.
For me, I installed openbabel with miniconda, so I found it in my miniconda packages.
Then you can use something like the following line to create the symlink:
sudo ln -s ~/opt/miniconda3/pkgs/openbabel-3.1.1-py39hb4f85b1_3 /usr/local/opt/open-babel

from mspcompiler.

tlgroff avatar tlgroff commented on September 26, 2024

I get the following error:

The downloaded binary packages are in
	/var/folders/j7/338rf36x105g2zk_2q6wmw600000gn/T//RtmpC2cfp6/downloaded_packages
✓  checking for file ‘/private/var/folders/j7/338rf36x105g2zk_2q6wmw600000gn/T/RtmpC2cfp6/remotes10ee3d7b7c08/QizhiSu-mspcompiler-703f515/DESCRIPTION’ (343ms)
─  preparing ‘mspcompiler’:
✓  checking DESCRIPTION meta-information ...
─  installing the package to build vignettes (379ms)
         -----------------------------------
─  installing *source* package ‘mspcompiler’ ...
   ** using staged installation
   ** R
   ** data
   *** moving datasets to lazyload DB
   ** inst
   ** byte-compile and prepare package for lazy loading
   Error: .onLoad failed in loadNamespace() for 'ChemmineOB', details:
     call: dyn.load(file, DLLpath = DLLpath, ...)
     error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/ChemmineOB/libs/ChemmineOB.so':
     dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/ChemmineOB/libs/ChemmineOB.so, 10): Library not loaded: /usr/local/opt/open-babel/lib/libopenbabel.7.dylib
     Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/ChemmineOB/libs/ChemmineOB.so
     Reason: image not found
   Execution halted
   ERROR: lazy loading failed for package ‘mspcompiler’
─  removing ‘/private/var/folders/j7/338rf36x105g2zk_2q6wmw600000gn/T/RtmpN7E44i/Rinst10fbe64f4d67f/mspcompiler’
         -----------------------------------
   ERROR: package installation failed
Error: Failed to install 'mspcompiler' from GitHub:
  System command 'R' failed, exit status: 1, stdout + stderr (last 10 lines):
E>   call: dyn.load(file, DLLpath = DLLpath, ...)
E>   error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/ChemmineOB/libs/ChemmineOB.so':
E>   dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/ChemmineOB/libs/ChemmineOB.so, 10): Library not loaded: /usr/local/opt/open-babel/lib/libopenbabel.7.dylib
E>   Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/ChemmineOB/libs/ChemmineOB.so
E>   Reason: image not found
E> Execution halted
E> ERROR: lazy loading failed for package ‘mspcompiler’
E> * removing ‘/private/var/folders/j7/338rf36x105g2zk_2q6wmw600000gn/T/RtmpN7E44i/Rinst10fbe64f4d67f/mspcompiler’
E>       -----------------------------------
E> ERROR: package installation failed

from mspcompiler.

QizhiSu avatar QizhiSu commented on September 26, 2024

Hi,
Did you try to install ChemmineR and ChemmineOB first following the code in the readme?
image

from mspcompiler.

tlgroff avatar tlgroff commented on September 26, 2024

Hi, Did you try to install ChemmineR and ChemmineOB first following the code in the readme? image

Yes, I have. Once I do enter the code above, do I then re-try the installation? This is what I have been doing. When I re-try installing, I still have issues with ChemmineR and ChemmineOB - I am prompted to update, and it seems no matter which update option I try there is still problems with the installation. Thanks for your response!

See below for more details (I have labeled my entries with ###, all other lines are output):

> if (!requireNamespace("BiocManager", quietly = TRUE)) ###
+   install.packages("BiocManager") ###
> 
> BiocManager::install("ChemmineR")###
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories'
for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.12 (BiocManager 1.30.16), R 4.0.3 (2020-10-10)
Warning message:
package(s) not installed when version(s) same as current; use `force = TRUE` to
  re-install: 'ChemmineR' 
> 
> if (!requireNamespace("BiocManager", quietly = TRUE)) ###
+   install.packages("BiocManager") ###
> 
> BiocManager::install("ChemmineOB") ###
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories'
for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.12 (BiocManager 1.30.16), R 4.0.3 (2020-10-10)
Warning message:
package(s) not installed when version(s) same as current; use `force = TRUE` to
  re-install: 'ChemmineOB' 
> install.packages("devtools") ###
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/devtools_2.4.2.tgz'
Content type 'application/x-gzip' length 393203 bytes (383 KB)
==================================================
downloaded 383 KB


The downloaded binary packages are in
	/var/folders/j7/338rf36x105g2zk_2q6wmw600000gn/T//Rtmp4BxHOB/downloaded_packages
> devtools::install_github("QizhiSu/mspcompiler", build_vignettes = TRUE) ###
Downloading GitHub repo QizhiSu/mspcompiler@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                                         
2: CRAN packages only                          
3: None                                        
4: ChemmineR  (3.42.2 -> 13ab93a3f...) [GitHub]
5: ChemmineOB (1.28.4 -> d4314fc44...) [GitHub]

Enter one or more numbers, or an empty line to skip updates: 1 ###
ChemmineR  (3.42.2 -> 13ab93a3f...) [GitHub]
ChemmineOB (1.28.4 -> d4314fc44...) [GitHub]
Downloading GitHub repo girke-lab/ChemmineR@HEAD
Error: Failed to install 'mspcompiler' from GitHub:
  Failed to install 'ChemmineR' from GitHub:
  Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.

from mspcompiler.

QizhiSu avatar QizhiSu commented on September 26, 2024

I think the problem was ChemminR and ChemmineOB. Maybe you can try to reinstall them using the force argument.

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("ChemmineR", force = TRUE)

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("ChemmineOB", force = TRUE)

Thanks for your attention.

Best Qizhi Su

from mspcompiler.

tlgroff avatar tlgroff commented on September 26, 2024

I am able to reinstall them using the force argument as shown in the code above. I then use the code:

install.packages("devtools")
devtools::install_github("QizhiSu/mspcompiler", build_vignettes = TRUE)

This immediately prompts me to update as shown in the image below. I have also tried entering in all of the numbers that it suggests.
Screen Shot 2021-11-17 at 1 58 12 PM

Besides entering in numbers to update, I can also restart R to update as shown in the pic below.
Screen Shot 2021-11-17 at 1 56 46 PM

How should I proceed from the point shown in the image below?
Screen Shot 2021-11-17 at 2 05 43 PM

I am able to successfully install ChemmineR and ChemmineOB using the code from your previously reply. It says they are successfully installed, but when I then try to install mspcompiler, it seems no matter which option I choose for updating that building the vignette fails. Do I need to load a specific library before trying to install mspcompiler?

Failure message:
Screen Shot 2021-11-17 at 2 05 13 PM

from mspcompiler.

QizhiSu avatar QizhiSu commented on September 26, 2024

Hi,
No specific library is required before installation. It seems that you still have problem with ChemmineR and ChemmineOB. I reconfirmed that it can be successfully installed on my side and my friend's computer. What operating system are you using?

Maybe you can take a look in the following links:
https://support.bioconductor.org/p/119886/
girke-lab/ChemmineOB#11

Hope it will be helpful.

Best regards

from mspcompiler.

tlgroff avatar tlgroff commented on September 26, 2024

Hi, I have solved the problem! Thank you for your help in doing so.

from mspcompiler.

QizhiSu avatar QizhiSu commented on September 26, 2024

@tlgroff Hi could you please tell me what was the problem?

from mspcompiler.

g0079 avatar g0079 commented on September 26, 2024

I met the same issue but on Windows 10. I think it might be caused by Patroon package which installed open babel automatically on my PC. I uninstalled open babel, then installed it again, and the problem solved.

from mspcompiler.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.