Error: package or namespace load failed for ‘dada2’ in loadNamespace


I am running qiime on an HPC, and am having issues with running dada2. I found the same error in the qiime forum, with no resolution, so I'm posting here hoping for some clarity (running qiime2-amplicon-2023.9).

qiime dada2 denoise-paired
--i-demultiplexed-seqs demux-paired-end.qza
--p-trunc-len-f 0
--p-trunc-len-r 0
--o-table dada2_table.qza
--o-representative-sequences dada2_rep_set.qza
--o-denoising-stats dada2_stats.qza

Warning message:
package ‘optparse’ was built under R version 4.2.3
R version 4.2.2 (2022-10-31)
Loading required package: Rcpp
Error: package or namespace load failed for ‘dada2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘GenomeInfoDbData’
8: stop(msg, call. = FALSE, domain = NA)
7: value[3L]
6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: tryCatchList(expr, classes, parentenv, handlers)
4: tryCatch({
attr(package, "LibPath") <- which.lib.loc
ns <- loadNamespace(package, lib.loc)
env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
}, error = function(e) {
P <- if (!is.null(cc <- conditionCall(e)))
paste(" in", deparse(cc)[1L])
else ""
msg <- gettextf("package or namespace load failed for %s%s:\n %s",
sQuote(package), P, conditionMessage(e))
if (logical.return && !quietly)
message(paste("Error:", msg), domain = NA)
else stop(msg, call. = FALSE, domain = NA)
3: library(dada2)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(library(dada2))
Traceback (most recent call last):
File "/home/mkweber_smith_edu/.conda/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/", line 326, in denoise_paired
File "/home/mkweber_smith_edu/.conda/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2_dada2/", line 36, in run_commands, check=True)
File "/home/mkweber_smith_edu/.conda/envs/qiime2-amplicon-2023.9/lib/python3.8/", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/tmpn88v7uwf/forward', '--input_directory_reverse', '/tmp/tmpn88v7uwf/reverse', '--output_path', '/tmp/tmpn88v7uwf/output.tsv.biom', '--output_track', '/tmp/tmpn88v7uwf/track.tsv', '--filtered_directory', '/tmp/tmpn88v7uwf/filt_f', '--filtered_directory_reverse', '/tmp/tmpn88v7uwf/filt_r', '--truncation_length', '150', '--truncation_length_reverse', '150', '--trim_left', '0', '--trim_left_reverse', '0', '--max_expected_errors', '2.0', '--max_expected_errors_reverse', '2.0', '--truncation_quality_score', '2', '--min_overlap', '12', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '1', '--learn_min_reads', '1000000']' returned non-zero exit status 1.

I have also run "cat ~/.Rprofile" and "R -e ".libPaths()"" commands to make sure that the HPC R version isn't overriding the R version in my qiime env, and it is not the issue here.


Hello @mkweber. This error likely means that something went wrong when installing QIIME 2. A clean reinstall would most likely fix it. Alternatively, you can install the missing dependency (or dependencies) manually as described here.


I ended up manually installing with Bioconductor and it worked ! Thanks!

For those who might come upon this thread in the future, this is the CLI code:


if(!require("BiocManager", quietly = TRUE))



This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.