GithubHelp home page GithubHelp logo

Comments (15)

jdblischak avatar jdblischak commented on September 26, 2024 1

@daynefiler Sorry you're having a frustrating time trying to install packages. Hopefully we can figure it out.

I noticed that the version of r-base you have installed is not from conda-forge. From conda list:

r                         3.5.1                 r351_1000    conda-forge
r-assertthat              0.2.0           r351h6115d3f_1001    conda-forge
r-base                    3.5.1                h1e0a451_2  
r-bh                      1.69.0_1         r351h6115d3f_0    conda-forge
r-bit                     1.1_12          r351h14c3975_1002    conda-forge

This could potentially be the problem. Could you try installing the following test environment and seeing if install.packages() works?

conda create -y -n test-cf-r -c conda-forge r-base

I just tested this on Linux. It installed r-base build he45234b_1005, and I was able to install a package from the same CRAN mirror that you were using:

> install.packages("whisker", repos = "https://ftp.osuosl.org/pub/cran/")
trying URL 'https://ftp.osuosl.org/pub/cran/src/contrib/whisker_0.3-2.tar.gz'
Content type 'application/x-gzip' length 27707 bytes (27 KB)
==================================================
downloaded 27 KB

* installing *source* package ‘whisker’ ...
** package ‘whisker’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (whisker)

The downloaded source packages are in
        ‘/tmp/RtmpfxyORL/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

from r-base-feedstock.

jdblischak avatar jdblischak commented on September 26, 2024 1

@mya205 Since you are getting a new error message, could you please open a new issue? It is very unlikely that you have the same versions installed as the original poster did back in February.

Some useful information to include when you create your issue:

  • conda --version
  • conda info
  • conda list
  • the install.packages() call and the full output

Also, please describe what you are trying to accomplish. Why do you need to run install.packages()? Is there a CRAN package you need that isn't yet available from conda-forge?

from r-base-feedstock.

isuruf avatar isuruf commented on September 26, 2024

@mingwandroid, do you know why conda-build doesn't show a warning about openssl not being linked even though lib/R/modules/internet.so is linked to libssl.so.1.0.0 ?

from r-base-feedstock.

daynefiler avatar daynefiler commented on September 26, 2024

@jdblischak THANK YOU! Seems to be working now. Do you have recommendations on managing R packages through conda vs R? This whole issue started because I couldn't install the XML package due to some non-R dependency. Then, updating conda before trying to fix the dependency sent me down this saga...

from r-base-feedstock.

jdblischak avatar jdblischak commented on September 26, 2024

THANK YOU! Seems to be working now.

@daynefiler You are very welcome! Glad that got it working.

Do you have recommendations on managing R packages through conda vs R?

conda is amazing for package management, but one downside is that it works best when you commit 100%. Everytime you use a non-conda piece of software, it increases the risk of breaking the conda environment. We have lots of CRAN packages on conda-forge and are adding more all the time. If you find one that is not yet available, you can create the recipe yourself using the conda_r_skeleton_helper and then submit it to conda-forge. And if there is an R package on GitHub (or similar) that you want to use, you can create your own recipe, build the package, and upload it to your personal channel on Anaconda Cloud (see here for my personal notes).

Another important thing to monitor is your list of channels. You have bioconda preferred over conda-forge, but that policy has changed. The docs to set up your channels now have conda-forge as the highest priority channel. I often run conda list to see where my conda packages are being installed from. In general, any package starting with r- should be from conda-forge (or occassionally bioconda for a bioinformtics CRAN package). If you see an r- package with no channel, this means it was installed from defaults, and something is likely wrong.

from r-base-feedstock.

daynefiler avatar daynefiler commented on September 26, 2024

I just installed snakemake and now I am back to R not working.

from r-base-feedstock.

isuruf avatar isuruf commented on September 26, 2024

@daynefiler, try conda install openssl=1.0.

from r-base-feedstock.

daynefiler avatar daynefiler commented on September 26, 2024

Trying to redo the same fix, as r-base is no longer conda-forge.

from r-base-feedstock.

daynefiler avatar daynefiler commented on September 26, 2024

If it's helpful, here is my .condarc file:

(base) [dfiler@ht4 ~]$ cat .condarc
channels:
  - bioconda
  - conda-forge
  - defaults
ssl_verify: true

from r-base-feedstock.

daynefiler avatar daynefiler commented on September 26, 2024

Sorry for all the comments. After installing snakemake, I was able to re-install r-base specifically from conda-forge and am back to working. I will just have to keep an eye on where the r installation is coming from as I install/update other packages.

from r-base-feedstock.

jdblischak avatar jdblischak commented on September 26, 2024

After installing snakemake, I was able to re-install r-base specifically from conda-forge and am back to working. I will just have to keep an eye on where the r installation is coming from as I install/update other packages.

@daynefiler You shouldn't have to do this. Could you please update your channel list to make conda-forge the priority, re-install snakemake, and then check r-base?

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda install -y snakemake
conda list r-base

from r-base-feedstock.

jdblischak avatar jdblischak commented on September 26, 2024

@daynefiler I am fairly certain the issue is your channel order. When I run the following:

conda create --dry-run -n test-snakemake -c conda-forge -c bioconda -c defaults r-base snakemake

It installs r-base from conda-forge:

r-base             conda-forge/linux-64::r-base-3.5.1-he45234b_1005

from r-base-feedstock.

daynefiler avatar daynefiler commented on September 26, 2024

Re-installing snakemake, after reprioritizing the channel configuration "broke" R again. Output from the commands given below.

(base) [dfiler@ht4 ~]$ conda config --add channels defaults
Warning: 'defaults' already in 'channels' list, moving to the top
(base) [dfiler@ht4 ~]$ conda config --add channels bioconda
Warning: 'bioconda' already in 'channels' list, moving to the top
(base) [dfiler@ht4 ~]$ conda config --add channels conda-forge
Warning: 'conda-forge' already in 'channels' list, moving to the top
(base) [dfiler@ht4 ~]$ cat .condarc 
channels:
  - conda-forge
  - bioconda
  - defaults
ssl_verify: true
(base) [dfiler@ht4 ~]$ conda install -y snakemake
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: /home/dfiler/tools/miniconda3

  added / updated specs:
    - snakemake


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    xorg-libsm-1.2.2           |       h470a237_5          24 KB  conda-forge
    ------------------------------------------------------------
                                           Total:          24 KB

The following packages will be UPDATED:

  graphviz           conda-forge::graphviz-2.38.0-hcf1ce16~ --> pkgs/main::graphviz-2.40.1-h21bd128_2
  openssl                              1.0.2p-h14c3975_1002 --> 1.1.1a-h14c3975_1000
  pango              conda-forge::pango-1.40.14-hf0c64fd_1~ --> pkgs/main::pango-1.42.4-h049681c_0
  python             conda-forge::python-3.6.7-hd21baee_10~ --> pkgs/main::python-3.6.8-h0371630_0

The following packages will be SUPERSEDED by a higher-priority channel:

  cryptography       conda-forge::cryptography-2.5-py36hb7~ --> pkgs/main::cryptography-2.5-py36h1ba5d50_0
  curl                  conda-forge::curl-7.64.0-h646f8bb_0 --> pkgs/main::curl-7.63.0-hbc83047_1000
  fontconfig         conda-forge::fontconfig-2.13.1-h2176d~ --> pkgs/main::fontconfig-2.13.0-h9420a91_0
  krb5               conda-forge::krb5-1.16.3-hc83ff2d_1000 --> pkgs/main::krb5-1.16.1-h173b8e3_7
  libcurl            conda-forge::libcurl-7.64.0-h01ee5af_0 --> pkgs/main::libcurl-7.63.0-h20c2e04_1000
  r-base             conda-forge::r-base-3.5.1-he45234b_10~ --> pkgs/r::r-base-3.5.1-h1e0a451_2
  r-openssl          conda-forge::r-openssl-1.1-r351hff1dc~ --> pkgs/r::r-openssl-1.0.2-r351h96ca727_1

The following packages will be DOWNGRADED:

  libuuid                              2.32.1-h14c3975_1000 --> 1.0.3-1
  wget                                    1.19.5-h1ad7b7a_0 --> 1.19.5-h20c2e04_0
  xorg-libsm                            1.2.3-h4937e3b_1000 --> 1.2.2-h470a237_5



Downloading and Extracting Packages
xorg-libsm-1.2.2     | 24 KB     | ######################################################################## | 100% 
Preparing transaction: done
Verifying transaction: /done
Executing transaction:done
(base) [dfiler@ht4 ~]$ conda list r-base
# packages in environment at /home/dfiler/tools/miniconda3:
#
# Name                    Version                   Build  Channel
r-base                    3.5.1                h1e0a451_2  

from r-base-feedstock.

jdblischak avatar jdblischak commented on September 26, 2024

Re-installing snakemake, after reprioritizing the channel configuration "broke" R again. Output from the commands given below.

@daynefiler Thanks for the report. I was also able to confirm this.

When installing sequentially, r-base gets downgraded:

$ conda create -y -n test-sequential --override-channels -c conda-forge -c bioconda -c defaults r-base
$ conda activate test-sequential
$ conda install -y --override-channels -c conda-forge -c bioconda -c defaults snakemake
$ conda list r-base
# packages in environment at /home/jdb-work/miniconda3-conda-forge/envs/test-sequential:
#
# Name                    Version                   Build  Channel
r-base                    3.4.3                h9bb98a2_5  

Strangely, with my setup it gets downgraded to r-base 3.4.3 from the defaults channel.

On the other hand, when installing r-base and snakemake at the same time, the correct version of R gets installed no matter whether bioconda or conda-forge is the highest priority:

$ conda create --dry-run -n test-cf-first --override-channels -c conda-forge -c bioconda -c defaults r-base snakemake
$ conda create --dry-run -n test-bioc-first --override-channels -c bioconda -c conda-forge -c defaults r-base snakemake
# r-base             conda-forge/linux-64::r-base-3.5.1-he45234b_1005

The strangest part to me is that it justifies downgrading r-base because of a higher-priority channel, which clearly isn't the case:

The following packages will be SUPERSEDED by a higher-priority channel:

from r-base-feedstock.

mya2152 avatar mya2152 commented on September 26, 2024

@daynefiler Sorry you're having a frustrating time trying to install packages. Hopefully we can figure it out.

I noticed that the version of r-base you have installed is not from conda-forge. From conda list:

r                         3.5.1                 r351_1000    conda-forge
r-assertthat              0.2.0           r351h6115d3f_1001    conda-forge
r-base                    3.5.1                h1e0a451_2  
r-bh                      1.69.0_1         r351h6115d3f_0    conda-forge
r-bit                     1.1_12          r351h14c3975_1002    conda-forge

This could potentially be the problem. Could you try installing the following test environment and seeing if install.packages() works?

conda create -y -n test-cf-r -c conda-forge r-base

I just tested this on Linux. It installed r-base build he45234b_1005, and I was able to install a package from the same CRAN mirror that you were using:

> install.packages("whisker", repos = "https://ftp.osuosl.org/pub/cran/")
trying URL 'https://ftp.osuosl.org/pub/cran/src/contrib/whisker_0.3-2.tar.gz'
Content type 'application/x-gzip' length 27707 bytes (27 KB)
==================================================
downloaded 27 KB

* installing *source* package ‘whisker’ ...
** package ‘whisker’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (whisker)

The downloaded source packages are in
        ‘/tmp/RtmpfxyORL/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Hi, I've tried this, and the initial create test conda forge environment was successful but when I try to install packages using install.packages I keep getting the error message:

-bash: syntax error near unexpected token `"whisker",'

Even though I've activated the newly created forge conda environment I still get this syntax error.

from r-base-feedstock.

Related Issues (20)

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.