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

failed to install 'unknown package' from GitHub. #90

Open
ryao-mdanderson opened this issue Jun 19, 2023 · 13 comments
Open

failed to install 'unknown package' from GitHub. #90

ryao-mdanderson opened this issue Jun 19, 2023 · 13 comments

Comments

@ryao-mdanderson
Copy link

Dear KaBbA authors:

I tried install the package under module load R/4.2.1 by the command:
devtools::install_github('mskilab/JaBbA')

Hit the similar message of
...
The downloaded source packages are in
‘/tmp/Rtmp9JUgRy/downloaded_packages’
Error: Failed to install 'unknown package' from GitHub:
Failed to install 'unknown package' from GitHub:
Failed to install 'gChain' from GitHub:
HTTP error 403.
API rate limit exceeded for 143.111.84.242. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Rate limit remaining: 0/60
Rate limit reset at: 2023-06-19 23:04:12 UTC

To increase your GitHub API rate limit

  • Use usethis::create_github_token() to create a Personal Access Token.
  • Use usethis::edit_r_environ() and add the token as GITHUB_PAT.

I don't have a project with github.

May you please advise?

Regards,
Rong

@ryao-mdanderson
Copy link
Author

@pwaltman @imielinski @walaj @evanbiederstedt Dear JaBba authors: any suggestions for this reported issue? Thank you!

@imielinski
Copy link
Collaborator

imielinski commented Jul 12, 2023 via email

@ryao-mdanderson
Copy link
Author

@imielinski Hello Marcin,

Thank you for your suggestions. I do not have a github token, this is my first time to hit this problem. I think I will proceed with R/4.1 to see if it works there.

Regards,
Rong

@ryao-mdanderson
Copy link
Author

@imielinski Hello Marcin,

using R/4.1.0 hit the similar problem for github credential.

I research and find this article https://github.com/settings/tokens/new, however, i failed to open the page on HPC node to proceed.

Do you have an example how you proceed? Or any other work around?

Regards,
Rong

@shihabdider
Copy link
Collaborator

shihabdider commented Aug 7, 2023

If you wish to generate a personal access token (PAT), I suggest you take a look at this: https://stackoverflow.com/a/33668077/10302846

Alternatively, as a workaround, you can try cloning the JaBbA repo and loading the package locally:

# in your terminal
git clone "https://github.com/mskilab-org/JaBbA.git"

# in the R console or script
devtools::load_all('path/to/clone')

@ryao-mdanderson
Copy link
Author

Thank you Shihab. @shihabdider

The workaround works for me.

Regards,
Rong

@shihabdider
Copy link
Collaborator

26e9102 now installs Sequenza from the CRAN archive, which should fix this issue.

@ryao-mdanderson
Copy link
Author

I revisit JaBbA installation for R/4.3.1 on RHEL8.
@shihabdider : From the above comment Sequenza has been from CRAN archive, however,

devtools::install_github('mskilab/JaBbA') still hit :
ERROR: dependency ‘sequenza’ is not available for package ‘JaBbA’

If I manually install sequenza:

install.packages("https://cran.r-project.org/src/contrib/Archive/sequenza/sequenza_3.0.0.tar.gz")
hit the following message
Installing package into ‘/rsrch3/home/itops/ryao/R/x86_64-pc-linux-gnu-library/4.3-jabba’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from 'pkgs'
trying URL 'https://cran.r-project.org/src/contrib/Archive/sequenza/sequenza_3.0.0.tar.gz'
Content type 'application/x-gzip' length 3478653 bytes (3.3 MB)
==================================================
downloaded 3.3 MB

ERROR: dependency ‘copynumber’ is not available for package ‘sequenza’

Then, if use BiocManager to install copynumber,

BiocManager::install("copynumber")
Bioconductor version 3.18 (BiocManager 1.30.22), R 4.3.1 (2023-06-16)
Installing package(s) 'BiocVersion', 'copynumber'
trying URL 'https://bioconductor.org/packages/3.18/bioc/src/contrib/BiocVersion_3.18.0.tar.gz'
Content type 'application/x-gzip' length 968 bytes
==================================================
downloaded 968 bytes

  • installing source package ‘BiocVersion’ ...
    ** using staged installation
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
  • DONE (BiocVersion)

The downloaded source packages are in
‘/tmp/Rtmp4IPVIR/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /risapps/rhel8/R/4.3.1/lib64/R/library
packages:
foreign, KernSmooth, lattice, Matrix, mgcv, nlme, rpart, spatial, survival
Warning message:
package ‘copynumber’ is not available for Bioconductor version '3.18'

The dependencies for JaBbA can't be installed. Do you have any suggestion? Thanks!

@shihabdider shihabdider reopened this Nov 9, 2023
@shihabdider
Copy link
Collaborator

It looks like your Bioconductor version is not compatible with the version of copynumber you are attempting to install. In particular, it looks like Bioconductor 3.18 removed copynumber from its list of supported packages: https://www.bioconductor.org/about/removed-packages/

You may instead try the installation instructions given here: https://www.bioconductor.org/packages//2.12/bioc/html/copynumber.html

E.g

source("https://bioconductor.org/biocLite.R")
biocLite("copynumber")

@ryao-mdanderson
Copy link
Author

Hello @shihabdider : Thank you for a reply with suggested approach. I tried the above method yesterday but the commands does not work as expected.
I am reinstalling JaBbA on R/4.3.1 on RHEL8 from scratch, I will see if this time any luck.

Thank you,
Rong

@ryao-mdanderson
Copy link
Author

Hello JaBbA authors,

I use R/4.3.1 to install JaBbA on RHEL8, it does not work.

devtools::install_github('mskilab/JaBbA')
hit error
ERROR: dependency ‘sequenza’ is not available for package ‘JaBbA’

Tried

install.packages("https://cran.r-project.org/src/contrib/Archive/sequenza/sequenza_3.0.0.tar.gz")
ERROR: dependency ‘copynumber’ is not available for package ‘sequenza’

Further to try

BiocManager::install("copynumber")
package ‘copynumber’ is not available for Bioconductor version '3.18'

source("https://bioconductor.org/biocLite.R")
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install

Also tried:

install.packages("https://www.bioconductor.org/packages//2.12/bioc/src/contrib/copynumber_1.1.1.tar.gz")
...
Error: object ‘DataFrame’ is not exported by 'namespace:IRanges'

NO luck to work on R/4.3.1.

@shihabdider
Copy link
Collaborator

shihabdider commented Nov 13, 2023

I was able to reproduce your original issue with installing copynumber. It seems this package also needs to be installed via its source and a PR will be made/merged soon to implement this. In the meantime, here is some code which should fix the issue:

# Download and install copynumber from source
copynumber_url <- "https://www.bioconductor.org/packages/3.14/bioc/bin/macosx/contrib/4.1/copynumber_1.34.0.tgz"  
copynumber_path <- tempfile(fileext = ".tar.gz")
download.file(copynumber_url, copynumber_path, mode="wb")
install.packages(copynumber_path, repos = NULL, type = "source")

# Now download and install sequenza from source
package_url <- "https://cran.r-project.org/src/contrib/Archive/sequenza/sequenza_3.0.0.tar.gz"
package_path <- tempfile(fileext = ".tar.gz")
download.file(package_url, package_path, mode="wb")
install.packages(package_path, repos = NULL, type = "source")

# Check if installation was successful
library(sequenza)

# Now install JaBbA from github
devtools::install_github("mskilab-org/JaBbA", upgrade="never", force=TRUE)

Also for the original github token error (which may also be relevant to the above code), you will need to first generate a github PAT (go here) and then add this as an environment variable via export GITHUB_PAT="your-generated-token-here". You can append this to your .bashrc to avoid having to add it every time you open a new shell.

@ryao-mdanderson
Copy link
Author

Hello @shihabdider Thank you for your reply.
Follow your suggestion, I am able to install JaBaA under R/4.3.1.

Now I guess my goal is to have a test case working under R/4.1.0 or R/4.3.1, which is reported in issue #97.

Thanks again for your consistent support.
Rong Yao

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

3 participants