source activate versus conda activate

Quick FYI / question

I am still able to activate and deactivate my environment using source activate - should I switch to conda activate instead? Will that interfere in any way with qiime2?

Please see warning below:

(base) A8-AN-EVK5387-M:~ evk5387$ source activate qiime2-2019.10
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
(qiime2-2019.10) A8-AN-EVK5387-M:~ evk5387$ qiime --help
Usage: qiime [OPTIONS] COMMAND [ARGS]…

QIIME 2 command-line interface (q2cli)

To get help with QIIME 2, visit https://qiime2.org.

To enable tab completion in Bash, run the following command or add it to
your .bashrc/.bash_profile:

  source tab-qiime

To enable tab completion in ZSH, run the following commands or add them to
your .zshrc:

  autoload bashcompinit && bashcompinit && source tab-qiime

Options:
–version Show the version and exit.
–help Show this message and exit.

Commands:
info Display information about current deployment.
tools Tools for working with QIIME 2 files.
dev Utilities for developers and advanced users.
alignment Plugin for generating and manipulating alignments.
composition Plugin for compositional data analysis.
cutadapt Plugin for removing adapter sequences, primers, and
other unwanted sequence from sequence data.
dada2 Plugin for sequence quality control with DADA2.
deblur Plugin for sequence quality control with Deblur.
demux Plugin for demultiplexing & viewing sequence quality.
diversity Plugin for exploring community diversity.
emperor Plugin for ordination plotting with Emperor.
feature-classifier Plugin for taxonomic classification.
feature-table Plugin for working with sample by feature tables.
fragment-insertion Plugin for extending phylogenies.
gneiss Plugin for building compositional models.
longitudinal Plugin for paired sample and time series analyses.
metadata Plugin for working with Metadata.
phylogeny Plugin for generating and manipulating phylogenies.
quality-control Plugin for quality control of feature and sequence data.
quality-filter Plugin for PHRED-based filtering and trimming.
sample-classifier Plugin for machine learning prediction of sample
metadata.
taxa Plugin for working with feature taxonomy annotations.
vsearch Plugin for clustering and dereplicating with vsearch.
(qiime2-2019.10) A8-AN-EVK5387-M:~ evk5387$ source deactivate
DeprecationWarning: ‘source deactivate’ is deprecated. Use ‘conda deactivate’.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
(base) A8-AN-EVK5387-M:~ evk5387$

1 Like

@ErikaGanda

Can't address the source/conda question.

I got the same warning about xcrun during the install today, and it was caused by my update to macOS Catalina (or any macOS update). Fixed with: $ xcode-select --install, and follow install instructions in popup window.

Maybe you have the same issue.

Mark

2 Likes

Awesome, that did the trick. Thanks!
E

1 Like

Hi @ErikaGanda!

This will not interfere with QIIME 2 at all! Please see the Conda 4.6 release announcement for more details:

Conda 4.4 introduced new scripts that make activation behavior uniform across operating systems. Where you once had “source activate envname” on unix, and just “activate envname” on windows, Conda 4.4 allowed “conda activate envname”. The problem was that setting up your shell to use this new feature was not always straightforward. Conda 4.6 adds extensive initialization support so that more shells than ever before can use the new “conda activate” command. For more information, read the output from “conda init –help” We’re especially excited about this new way of working, because removing the need to modify PATH makes Conda much less disruptive to other software on your system.

I wouldn't be surprised if the conda team stops supporting the source activate mechanism, since it isn't as portable, so you might be doing yourself a favor and switching to the conda activate syntax now.

1 Like