10/31/2022 0 Comments Install gfortran in conda environment![]()
opt/anaconda/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -fPIC -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/opt/anaconda/anaconda3/include -L/opt/anaconda/anaconda3/lib -c nnnpls.f -o nnnpls.o ![]() Specifically, now, after going to R in the command line and running again (inside of R) install.packages("nnls"), I got the errors: This didn't fix my problem, but it did seem to at least modify it. #Install gfortran in conda environment install#(Also, for the record, it might make sense to change the default anaconda installation to include gfortran and clang along with the r-essentials package, since they appear to be necessary for many R packages which are essentially nothing more than Fortran or C wrappers, as is the case with nnls.) Using the instructions here, I was able to use conda to install a "conda-compatible" version of gfortran onto my system. #Install gfortran in conda environment code#The gist of this thread here seemed to be that one should install code compilers using conda in order to avoid such errors, a fact which I hadn't appreciated. I checked this, using in part the help from here, even though I remembered having done this many years ago, and indeed I do have XCode and command line tools installed. here or here) was "check whether you have XCode and command line tools installed". The most common suggestion that seemed to come up (e.g. (obviously this did not work, but again I was/am somewhat desperate).Īfter doing some more Googling, looking at the following links: (1) (2) as well as (3). First, I downloaded gfortran manually here, and then copied the binary to the directory So I tried to a lot of things to get around this. ![]() * removing ‘/opt/anaconda/anaconda3/lib/R/library/nnls’ Make: /opt/anaconda/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran: No such file or directoryĮRROR: compilation failed for package ‘nnls’ opt/anaconda/anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran -fPIC -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe -I/opt/anaconda/anaconda3/include -L/opt/anaconda/anaconda3/lib -c lawson_hanson_nnls.f -o lawson_hanson_nnls.o ** package ‘nnls’ successfully unpacked and MD5 sums checked This time it failed again, but for a different reason this time the dependency which couldn't install was the CRAN package nnls, which is a Fortran wrapper. Then I went back to R again via the command line and ran install.packages("SuperLearner") again. (I need to install the package for my coursework, so that kind of forced my hand to try anything.)Īfter running R in the command line, and then install.packages("SuperLearner") from within R, I exited R and then ran in the command line: conda install r-gtools, which worked. Basically, after being unable to uninstall the CRAN package "SuperLearner" using conda (which is what I wanted to do, since it's better to use a package manager for reasons with which you are probably already familiar), I decided to try to "brute force" install the package jankily using the install.packages("SuperLearner") command in R/RStudio. This issue is a follow-up to an issue which I filed with conda-build, but which probably was not actually a problem with conda-build. This presumably would deter R users from wanting to use the Anaconda distribution, thereby limiting its broader appeal to data scientists. #Install gfortran in conda environment full#So having Anaconda's R and RStudio break after installing gfortran and clang means that Anaconda's R and RStudio are unable to access the full functionality of R. nnls), or any package which depends on such packages (e.g. ![]() ![]() In particular, gfortran and clang are necessary to install R packages which are essentially wrappers around Fortran code (e.g. I also think that updating conda shouldn't cause command line R to no longer work when it had worked before. I think RStudio should still open after installing clang and gfortran. Dyld: Library not loaded: from: /opt/anaconda/anaconda3/lib/libc++.1.dylib ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |