question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dplyr: namespace ‘Rcpp’ 0.12.14 is being loaded, but >= 0.12.15 is required

See original GitHub issue

Creating the conda env:

$ conda create -n test_env conda-forge::r-ape conda-forge::r-dplyr conda-forge::r-tidyr conda-forge::r-ggplot2
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.5.8
  latest version: 4.5.9

Please update conda by running

    $ conda update -n base conda



## Package Plan ##

  environment location: /ebio/abt3_projects/software/dev/miniconda3_dev/envs/test_env

  added / updated specs:
    - conda-forge::r-ape
    - conda-forge::r-dplyr
    - conda-forge::r-ggplot2
    - conda-forge::r-tidyr


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    r-mgcv-1.8_24              |   r341h470a237_1         2.4 MB  conda-forge
    r-ape-5.1                  |   r341hfc679d8_1         1.5 MB  conda-forge
    r-tidyr-0.8.1              |   r341hfc679d8_1         404 KB  conda-forge
    r-matrix-1.2_14            |   r341h470a237_1         2.4 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         6.7 MB

The following NEW packages will be INSTALLED:

    bzip2:            1.0.6-h470a237_2       conda-forge
    ca-certificates:  2018.4.16-0            conda-forge
    cairo:            1.14.12-he56eebe_3     conda-forge
    curl:             7.61.0-h93b3f91_1      conda-forge
    fontconfig:       2.13.0-h0c61d53_4      conda-forge
    freetype:         2.8.1-hfa320df_1       conda-forge
    gettext:          0.19.8.1-0             conda-forge
    glib:             2.55.0-h464dc38_2      conda-forge
    graphite2:        1.3.11-hfc679d8_0      conda-forge
    gsl:              2.1-2                  conda-forge
    harfbuzz:         1.8.5-h2bb21d5_0       conda-forge
    icu:              58.2-hfc679d8_0        conda-forge
    jpeg:             9c-h470a237_0          conda-forge
    krb5:             1.14.6-0               conda-forge
    libffi:           3.2.1-3                conda-forge
    libgcc:           7.2.0-h69d50b8_2
    libgcc-ng:        7.2.0-hdf63c60_3
    libgfortran:      3.0.0-1
    libiconv:         1.15-h470a237_1        conda-forge
    libpng:           1.6.34-ha92aebf_1      conda-forge
    libssh2:          1.8.0-h5b517e9_2       conda-forge
    libstdcxx-ng:     7.2.0-hdf63c60_3
    libtiff:          4.0.9-he6b73bb_1       conda-forge
    libuuid:          1.0.3-1                conda-forge
    libxcb:           1.13-h470a237_2        conda-forge
    libxml2:          2.9.8-h422b904_2       conda-forge
    ncurses:          5.9-10                 conda-forge
    openssl:          1.0.2o-h470a237_1      conda-forge
    pango:            1.40.14-h9105a7a_2     conda-forge
    pcre:             8.39-0                 conda-forge
    pixman:           0.34.0-2               conda-forge
    pthread-stubs:    0.4-h470a237_1         conda-forge
    r-ape:            5.1-r341hfc679d8_1     conda-forge
    r-assertthat:     0.2.0-r3.4.1_0         conda-forge
    r-base:           3.4.1-4                conda-forge
    r-bh:             1.66.0_1-r3.4.1_0      conda-forge
    r-bindr:          0.1.1-r3.4.1_0         conda-forge
    r-bindrcpp:       0.2.2-r341h9d2a408_0   conda-forge
    r-cli:            1.0.0-r3.4.1_0         conda-forge
    r-colorspace:     1.3_2-r341h470a237_1   conda-forge
    r-crayon:         1.3.4-r3.4.1_0         conda-forge
    r-dichromat:      2.0_0-r3.4.1_0         conda-forge
    r-digest:         0.6.15-r341h470a237_1  conda-forge
    r-dplyr:          0.7.6-r341h9d2a408_0   conda-forge
    r-ggplot2:        3.0.0-r341h6115d3f_0   conda-forge
    r-glue:           1.3.0-r341h470a237_1   conda-forge
    r-gtable:         0.2.0-r3.4.1_0         conda-forge
    r-labeling:       0.3-r3.4.1_0           conda-forge
    r-lattice:        0.20_34-r3.4.1_0       conda-forge
    r-lazyeval:       0.2.1-r341h470a237_1   conda-forge
    r-magrittr:       1.5-r3.4.1_0           conda-forge
    r-mass:           7.3_50-r341hc070d10_1  conda-forge
    r-matrix:         1.2_14-r341h470a237_1  conda-forge
    r-mgcv:           1.8_24-r341h470a237_1  conda-forge
    r-munsell:        0.5.0-r341_0           conda-forge
    r-nlme:           3.1_131-r341ha44fe06_1 conda-forge
    r-pillar:         1.2.2-r341h6115d3f_1   conda-forge
    r-pkgconfig:      2.0.1-r3.4.1_0         conda-forge
    r-plogr:          0.2.0-r341h6115d3f_0   conda-forge
    r-plyr:           1.8.4-r341hfc679d8_1   conda-forge
    r-purrr:          0.2.4-r341h470a237_1   conda-forge
    r-r6:             2.2.2-r3.4.1_0         conda-forge
    r-rcolorbrewer:   1.1_2-r3.4.1_0         conda-forge
    r-rcpp:           0.12.17-r341h9d2a408_1 conda-forge
    r-reshape2:       1.4.3-r341hfc679d8_1   conda-forge
    r-rlang:          0.2.1-r341h470a237_1   conda-forge
    r-scales:         0.5.0-r341hfc679d8_1   conda-forge
    r-stringi:        1.2.3-r341hfc679d8_1   conda-forge
    r-stringr:        1.3.1-r341_0           conda-forge
    r-tibble:         1.4.2-r341h470a237_1   conda-forge
    r-tidyr:          0.8.1-r341hfc679d8_1   conda-forge
    r-tidyselect:     0.2.4-r341hfc679d8_1   conda-forge
    r-utf8:           1.1.3-r341h470a237_1   conda-forge
    r-viridislite:    0.3.0-r3.4.1_0         conda-forge
    r-withr:          2.1.1-r3.4.1_0         conda-forge
    readline:         7.0-0                  conda-forge
    tk:               8.6.8-0                conda-forge
    xorg-kbproto:     1.0.7-h470a237_2       conda-forge
    xorg-libice:      1.0.9-h470a237_4       conda-forge
    xorg-libsm:       1.2.2-h470a237_5       conda-forge
    xorg-libx11:      1.6.5-h470a237_2       conda-forge
    xorg-libxau:      1.0.8-h470a237_6       conda-forge
    xorg-libxdmcp:    1.1.2-h470a237_7       conda-forge
    xorg-libxext:     1.3.3-h470a237_4       conda-forge
    xorg-libxrender:  0.9.10-h470a237_2      conda-forge
    xorg-renderproto: 0.11.1-h470a237_2      conda-forge
    xorg-xextproto:   7.3.0-h470a237_2       conda-forge
    xorg-xproto:      7.0.31-h470a237_7      conda-forge
    xz:               5.2.4-h470a237_0       conda-forge
    zlib:             1.2.11-h470a237_3      conda-forge

Proceed ([y]/n)?


Downloading and Extracting Packages
r-mgcv-1.8_24        |  2.4 MB | ########################################################################################################################################### | 100%
r-ape-5.1            |  1.5 MB | ########################################################################################################################################### | 100%
r-tidyr-0.8.1        |  404 KB | ########################################################################################################################################### | 100%
r-matrix-1.2_14      |  2.4 MB | ########################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate test_env
#
# To deactivate an active environment, use
#
#     $ conda deactivate

Testing:

$ conda activate test_env
$ R

> library(dplyr)

Error generated:

Error: package or namespace load failed for ‘dplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘Rcpp’ 0.12.14 is being loaded, but >= 0.12.15 is required

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
nick-youngblutcommented, Aug 7, 2018

It’s weird though that my older conda install (conda 4.3.29 with R 3.3.2) doesn’t include my home directory R install in the libPaths, but my newer version of conda (conda 4.5.9 with R 3.4.1) does. So the old version of conda + R is not looking in my HOME directory. Why should R installed in a conda env look into a HOME directory? I thought the whole point of conda envs was to isolate the software in the envs.

0reactions
jdblischakcommented, Sep 11, 2018

From a normal Ubuntu 18.04 Docker container:

@bgruening I wasn’t able to reproduce the behavior you observed. Using Ubuntu 18.04 and installing pandas in an environment (via conda activate), I still get an error due to the user-installation of numpy:

docker run --rm -it ubuntu:bionic
# Install conda
apt update
apt install -y --no-install-recommends bzip2 ca-certificates curl
curl -s -L https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh > miniconda.sh
openssl md5 miniconda.sh | grep e1045ee415162f944b6aebfe560b8fee
bash miniconda.sh -b -p /opt/conda
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
source /opt/conda/etc/profile.d/conda.sh
conda activate
conda config --set show_channel_urls True
conda config --add channels conda-forge
conda update --all --yes
# Install old version of numpy
# - Had to use Python 3.6. Always got errors with Python 3.7
# - Had to install gcc with APT. Always got error with conda
conda install -y python=3.6
apt install -y gcc
pip install --user 'numpy==1.8.2'
python -c 'import numpy;print( numpy.__version__)'
# 1.8.2
# Create conda environment
conda create -n pandas -y pandas
conda activate pandas
python -c 'import numpy;print( numpy.__version__)'
# 1.8.2
python -c 'import pandas'
# Traceback (most recent call last):
#   File "<string>", line 1, in <module>
#   File "/opt/conda/envs/pandas/lib/python3.6/site-packages/pandas/__init__.py", line 23, in <module>
#     from pandas.compat.numpy import *
#   File "/opt/conda/envs/pandas/lib/python3.6/site-packages/pandas/compat/numpy/__init__.py", line 24, in <module>
#     'this pandas version'.format(_np_version))
# ImportError: this version of pandas is incompatible with numpy < 1.9.0
# your numpy version is 1.8.2.
# Please upgrade numpy to >= 1.9.0 to use this pandas version

But I guess I completely misunderstood the problem here. Nevermind, sorry for the noise.

No need to apologize! I think it is important to discuss and understand this issue with user-installed packages. It is so often over-looked, but it can cause conda users a lot of pain (e.g. this current issue).

Read more comments on GitHub >

github_iconTop Results From Across the Web

R install package loaded namespace - Stack Overflow
In my case, I was not able to load dplyr package. So, first I installed Rcpp package and then installed dplyr package.
Read more >
namespace 'Rcpp' 0.12.18 is already loaded, but >= 1.0.1 is ...
If you are using RStudio, you can press Ctrl/Cmd + Shift + F10 for that. Usually this error means that, unsurprisingly, Rcpp is...
Read more >
[R] Updating Rcpp package when it is claimed by dplyr
Previous message (by thread): [R] Updating Rcpp package when it is ... Error: package 'Rcpp' 0.12.3 was found, but >= 0.12.12 is required...
Read more >
Rcpp Changelog - Dirk Eddelbuettel
NA): Idem 2017-11-30 James J Balamuta * src/attributes.cpp: Fixed missing Rcpp namespace in export interface generation 2017-11-25 Dirk Eddelbuettel ...
Read more >
Rcpp package - RDocumentation
The 'Rcpp' package provides R functions as well as C++ classes which ... R and automatically generating the code required to invoke them....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found