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

Cannot install on mac #7

Open
tylermanning opened this issue Sep 15, 2019 · 9 comments
Open

Cannot install on mac #7

tylermanning opened this issue Sep 15, 2019 · 9 comments
Labels

Comments

@tylermanning
Copy link

What versions does this package work with? I've tried 3.3, 3.6, different ways to install. Nothing is working.

@AnthonyEbert
Copy link
Owner

It should work with both those R versions. How did you try to install it? What error messages did you get?

FYI It's not yet available on CRAN, you need to install the devtools library and then run devtools::install_github("AnthonyEbert/EasyMMD")

@tylermanning
Copy link
Author

tylermanning commented Sep 15, 2019

this is the stack trace, everytime i solve one issue and new one pops up

`

devtools::install_github("AnthonyEbert/EasyMMD")
Downloading GitHub repo AnthonyEbert/EasyMMD@master
✔ checking for file ‘/private/var/folders/w6/r7lqmtbs6lqfs1x9nvtl5q400000gn/T/RtmpcRJMzT/remotes11b403cdb13f4/AnthonyEbert-EasyMMD-a81a8a8/DESCRIPTION’ ...
─ preparing ‘EasyMMD’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘EasyMMD/other’
─ building ‘EasyMMD_0.5.3.tar.gz’

  • installing source package ‘EasyMMD’ ...
    ** using staged installation
    ** libs
    clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c MMD_full_loop.cpp -o MMD_full_loop.o
    clang: error: unsupported option '-fopenmp'
    make: *** [MMD_full_loop.o] Error 1
    ERROR: compilation failed for package ‘EasyMMD’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/EasyMMD’
    Error: Failed to install 'EasyMMD' from GitHub:
    (converted from warning) installation of package ‘/var/folders/w6/r7lqmtbs6lqfs1x9nvtl5q400000gn/T//RtmpcRJMzT/file11b4062bc4d7d/EasyMMD_0.5.3.tar.gz’ had non-zero exit status
    `

@AnthonyEbert
Copy link
Owner

Strange... could you try

install.packages("RcppArmadillo")

@tylermanning
Copy link
Author

tylermanning commented Sep 15, 2019

That installed no problem it seems:

`

install.packages("RcppArmadillo")
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES.rds': HTTP status was '404 Not Found'
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/RcppArmadillo_0.9.700.2.0.tgz'
Content type 'application/x-gzip' length 1740941 bytes (1.7 MB)
==================================================
downloaded 1.7 MB

The downloaded binary packages are in
/var/folders/w6/r7lqmtbs6lqfs1x9nvtl5q400000gn/T//RtmpMNGhuz/downloaded_packages
Warning message:
R graphics engine version 12 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.
`

@AnthonyEbert
Copy link
Owner

I don't know... I'll test it out on mac.

@AnthonyEbert
Copy link
Owner

I tried to install on mac and had your same error

* installing *source* package ‘EasyMMD’ ...
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Users/userlJYTh4an/R/Rcpp/include" -I"/Users/userlJYTh4an/R/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp  -fPIC  -Wall -g -O2  -c MMD_full_loop.cpp -o MMD_full_loop.o
clang: error: unsupported option '-fopenmp'
make: *** [MMD_full_loop.o] Error 1
ERROR: compilation failed for package ‘EasyMMD’
* removing ‘/Users/userlJYTh4an/R/EasyMMD’

I don't know how to fix it at the moment. Maybe there is some useful information here
velocyto-team/velocyto.R#2

@AnthonyEbert AnthonyEbert changed the title Cannot install Cannot install on mac Sep 15, 2019
@tylermanning
Copy link
Author

thanks for the help, im gonna give up for now and go back to python

@tylermanning
Copy link
Author

I got it working on Linux. Does the quadratic MMD work with matrices? Can you provide a toy test case cause I've tried several combinations and it keeps throwing a mat mult error.

@AnthonyEbert
Copy link
Owner

I have only implemented the exponential kernel (radial basis function) in EasyMMD.

Here is the example you asked for.

This code is now included in the help file for the MMD function:

library(mvtnorm)

x <- rmvnorm(100, c(0,0), diag(c(2,2)))
sigma <- matrix(c(2,1.5,1.5,2), ncol=2)
y <- rmvnorm(100, c(0,0), sigma = sigma)

MMD(y, x, var = diag(c(0.5, 0.5)), bias = TRUE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants