Namespace error in R while running dada2

Hi qiime2 team,

I just installed the newest version of qiime2 (2023.2) and when I run dada2 denoise-paired (below the code) that works fine using 2021.11, I get the following error in stdout:

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]]):
namespace ‘vctrs’ 0.4.1 is being loaded, but >= 0.5.0 is required

I tried updating all packages within R using update.packages(), but still get this error.. Not sure how to solve it?

Thanks for your help!

ps. Here's the code I was trying to run, but like I said, this works fine in 2021.11

qiime dada2 denoise-paired
--p-n-threads 20
--i-demultiplexed-seqs 2_Trim-primers/primer-trimmed.qza
--p-trunc-len-f 130
--p-trunc-len-r 130
--o-table 4_Denoising-DADA2/table-trimmed.qza
--o-representative-sequences 4_Denoising-DADA2/rep-trimmed-seqs.qza
--o-denoising-stats 4_Denoising-DADA2/denoising-trimmed-stats.qza

Hello @marcelpolling,

Try updating "vctrs" with install.packages("vctrs") directly in a fresh R console. Then run packageVersion("vctrs") to make sure it is >= 0.5.0. Then try re-running. Make sure to do both of these with your qiime environment activated.

Thanks :grinning:

Hi @colinvwood!

Thanks for your reply, I still got an error message (ERROR: failed to lock directory for modifying Try removing '~/.00LOCK-vctrs’).

After some googling I found a workaround that made it work:

install.packages("vctrs", dependencies = TRUE, INSTALL_opts = '--no-lock')

Now when I do packageVersion("vctrs") it gives ‘0.6.1’ :slight_smile:

Thanks again!


1 Like


Thank you for documenting the solution. :slightly_smiling_face:

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