# Conda Anvi'o v6.2 on Mac woes :(
As Meren notes on the [installation help page](http://merenlab.org/2016/06/26/installation-v2/#installation-with-conda-painless-method-suggested-for-everyone), the conda installation of anvio v6.2 may take a while. He notes it took 4 hours on his comp. I sadly gave up after 2 days...
![](https://i.imgur.com/YQieiid.png)
Two separate tries I killed it after 2 days. This doesn't seem to be happening on any of the linux servers I work on, but it is a problem on my Mac. **And it seems to be problematic (at least for me) with only anvi'o v6.2, as installing anvi'o v6.1 with conda is done successfully in 2 minutes and 45 seconds!**
Processing heavy things is great on servers, but when that's all done and it's time to swim around in anvi'o, i like having it local. So I needed to find another way.
Fortunately, that wasn't hard following the framework already up on the anvi'o installation page for working with the [active code base](http://merenlab.org/2016/06/26/installation-v2/#following-the-active-codebase-youre-a-wizard-arry), and I could modify that to install v6.2, but avoid conda's massive holdups. Doing the install as shown below took about 10 minutes the first time, and then 5 minutes the second (after i had lots of the things installed already, but the point is that conda's solving environment wasn't a hold up).
## Installing anvi'o v6.2 through conda's backdoor
```bash
conda create -y -n anvio-6.2 python=3.6
conda activate anvio-6.2
```
For the conda installs, I've added `h5py` and `illumina-utils` (as compared to the template pulled from the anvi'o installation page). `h5py` seemed to be missing when for me when i tried an `anvi-migrate` command, and the forthcoming `pip` install of `illumina-utils` kept giving me some egg error on my Mac, but installing via conda got around that whether it was just me or not:
```bash
conda install -y -c conda-forge -c bioconda -c defaults prodigal \
mcl muscle hmmer diamond=0.9.14 blast megahit bowtie2 \
bwa samtools centrifuge trimal iqtree fastani fasttree r-base \
r-stringi r-tidyverse r-magrittr r-optparse bioconductor-qvalue \
trnascan-se h5py illumina-utils=2.7
```
Getting and unpacking anvi'o v6.2:
```bash
cd ~/
mkdir anvio-versions
cd anvio-versions
curl -LO https://github.com/merenlab/anvio/releases/download/v6.2/anvio-6.2.tar.gz
tar -xzvf anvio-6.2.tar.gz && rm anvio-6.2.tar.gz
cd anvio-6.2
```
Installing pip goodies:
```bash
pip install -r requirements.txt
```
Now we just need to setup some commands that will run when we launch and deactivate this conda environment, so it properly points to (and afterwards unpoints to) the extra places we need (like where we have anvio-6.2).
First we need to save the location of where our conda environment is:
```bash
TMP_CONDA_PREFIX=$CONDA_PREFIX
```
And now we need to exit the conda environment:
```bash
conda deactivate
```
Now we are adding some PATH adjustments to a script that will be automatically run when our new anvio-6.2 conda environment launches:
```bash
# storing PATHs prior to adjustments each time we launch the conda environment, so we can manually reset it when exiting it
echo "ORIG_PATH=$PATH" >> ${TMP_CONDA_PREFIX}/etc/conda/activate.d/anvio-6.2.sh
echo "ORIG_PYTHONPATH=$PYTHONPATH" >> ${TMP_CONDA_PREFIX}/etc/conda/activate.d/anvio-6.2.sh
# adding bin and sandbox to the conda environment PATH
echo "export PYTHONPATH=${PWD}:\$PYTHONPATH" >> ${TMP_CONDA_PREFIX}/etc/conda/activate.d/anvio-6.2.sh
echo "export PATH=${PWD}/bin:${PWD}/sandbox:\$PATH" >> ${TMP_CONDA_PREFIX}/etc/conda/activate.d/anvio-6.2.sh
```
And last thing we are going to do is add some commands that will be run automatically when we deactivate the environment:
```bash
echo "export PATH=$ORIG_PATH" >> ${TMP_CONDA_PREFIX}/etc/conda/deactivate.d/anvio-6.2.sh
echo "export PYTHONPATH=$ORIG_PYTHONPATH" >> ${TMP_CONDA_PREFIX}/etc/conda/deactivate.d/anvio-6.2.sh
```
Great! Now we're ready to rock:
```bash
conda activate anvio-6.2
anvi-self-test -v
```
>Anvi'o version ...............................: esther (v6.2)
Profile DB version ...........................: 31
Contigs DB version ...........................: 14
Pan DB version ...............................: 13
Genome data storage version ..................: 6
Auxiliary data storage version ...............: 2
Structure DB version .........................: 1
And now i can go swimming :)