# Qiime2 installation with dependencies downloaded locally

**URL:** <https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536>\
**Category:** User Support\
**Tags:** conda\
**Created:** [March 23, 2018, 5:28pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536 "2018-03-23T17:28:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![atg](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@atg](https://forum.qiime2.org/u/atg)\
**Post date:** [March 23, 2018, 5:28pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/1 "2018-03-23T17:28:19Z")

</div>

Hi all  
Thanks for Qiime2! Its a great tool and nice to use.

I am behind an institution firewall that blocks mass storage places, so I cannot download using wget. Up to version 2017.11 I could download the dependencies externally using the provided .txt file. Move them to the local computer and install using the --offline tag. Worked perfect. I tried to upgrade to 2018.2 now. The .yml file makes it slightly more complicated but it still works to download the packages on an external machine. But when I try installing it using the --offline flag I get the following error message

 ![grafik](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/1/12400d17c5f7533501656854cf36e231ed0d7d7b.png)

Compared to previous installations the miniconda/envs/qiime folder gets created but stays empty. Would you have hint on how to solve this error?

I am using miniconda3, pyhton 3.6.4 on debian

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [March 26, 2018, 3:02pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/2 "2018-03-26T15:02:35Z")

</div>

Assigned @ebolyen on March 26, 2018, 3:02pm UTC



---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [March 26, 2018, 8:51pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/3 "2018-03-26T20:51:38Z")

</div>

Hi @atg,

It doesn't look like there's a good way to do this with the `.yml` file. However, you should still be able to use your original process! You'll just be creating the old `txt` version first on the machine that wasn't behind the firewall.

On the host that has the working environment run (inside that environment):

```bash
conda list --export > your-new-environment.txt

```

This is the file you'll want to transfer to the offline host and use with the --offline tag like you've done before.

Let me know if that works!

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [March 26, 2018, 8:51pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/4 "2018-03-26T20:51:53Z")

</div>

Unassigned @ebolyen on March 26, 2018, 8:51pm UTC



---

<div class="post-metadata">

**Author:** ![atg](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@atg](https://forum.qiime2.org/u/atg)\
**Post date:** [March 29, 2018, 2:26pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/5 "2018-03-29T14:26:35Z")

</div>

still no luck. Can easily create that file and try to install with  
conda create --name qiime2\_2018.12 --file Environment\_qiime2\_2018\_2.txt --offline /home/bioinf/miniconda3/pkgs/\*.tar.bz2

the error was always python related and the machine which has a working installation has python3.5 but the offline machine has python3.6. May that be a source of error? The miniconda I'm using is also python 3.6

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [March 29, 2018, 3:18pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/6 "2018-03-29T15:18:43Z")

</div>

Assigned @ebolyen on March 29, 2018, 3:18pm UTC



---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [April 3, 2018, 2:42pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/7 "2018-04-03T14:42:24Z")

</div>

Hi @atg,

Could you post the error? I think your command _should_ work, so I'm not sure what's going on.

Another avenue you can explore is creating file-system conda channels (called custom channels). It's a little bit more involved, but if you do this often enough it is probably worthwhile. It's also more likely to work like you would expect as it's treated just like any other conda channel: [https://conda.io/docs/user-guide/tasks/create-custom-channels.html](https://conda.io/docs/user-guide/tasks/create-custom-channels.html)

We use custom channels pretty extensively in our build/CI process and they do work very well. Just remove the channel list in the yaml file (or use the txt file) and pass your path to the install command (`--channel /path/here`).

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [April 3, 2018, 2:42pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/8 "2018-04-03T14:42:26Z")

</div>

Unassigned @ebolyen on April 3, 2018, 2:42pm UTC



---

<div class="post-metadata">

**Author:** ![atg](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/a/6bbea6/32.png) [@atg](https://forum.qiime2.org/u/atg)\
**Post date:** [April 12, 2018, 1:35pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/9 "2018-04-12T13:35:10Z")

</div>

HI Evan, thanks for your help

When I run the command: conda create --name qiime2\_2018.2 --file Environment\_qiime2\_2018\_2.txt --offline /home/bioinf/miniconda2/pkgs/\*.tar.bz2

I get the error:

Preparing transaction: done  
Verifying transaction: done  
Executing transaction: failed  
ERROR conda.core.link:\_execute(481): An error occurred while installing package '::jupyter\_core-4.4.0-py\_0'.  
OSError(2, 'No such file or directory')  
Attempting to roll back.

Rolling back transaction: done

OSError(2, 'No such file or directory')

Although the jupyter package is in the pkgs folder as a tar.bz2

When I run in verbose mode I get for every package:

file exists, but clobbering: u'/home/bioinf/miniconda2/envs/qiime2\_2018.2/lib/python3.5/site-packages/pip/vcs/ **pycache** /subversion.cpython-35.pyc'

and then:

===\> LINKING PACKAGE: ::jupyter\_core-4.4.0-py\_0 \<===  
prefix=/home/bioinf/miniconda2/envs/qiime2\_2018.2  
source=/home/bioinf/miniconda2/pkgs/jupyter\_core-4.4.0-py\_0

===\> REVERSING PACKAGE LINK: ::jupyter\_core-4.4.0-py\_0 \<===  
prefix=/home/bioinf/miniconda2/envs/qiime2\_2018.2

done  
Traceback (most recent call last):  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/exceptions.py", line 789, in **call**  
return func(\*args, \*\*kwargs)  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/cli/main.py", line 78, in \_main  
exit\_code = do\_call(args, p)  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/cli/conda\_argparse.py", line 77, in do\_call  
exit\_code = getattr(module, func\_name)(args, parser)  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/cli/main\_create.py", line 11, in execute  
install(args, parser, 'create')  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/cli/install.py", line 173, in install  
explicit(args\_packages, prefix, verbose=not context.quiet)  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/misc.py", line 90, in explicit  
txn.execute()  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/core/link.py", line 225, in execute  
self.\_execute(tuple(concat(interleave(itervalues(self.prefix\_action\_groups)))))  
File "/home/bioinf/miniconda2/lib/python2.7/site-packages/conda/core/link.py", line 500, in \_execute  
rollback\_excs,  
CondaMultiError: [Errno 2] No such file or directory

It seems to me that he tries to write into the pkgs folder but doesnt want to install stuff in the envs/Qiime/

The installation file from the machine with the working installation looks like that:

folder[Environment\_qiime2\_2018\_2.txt](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/a/ab1aa38c8dff80003a9fe05f2f4d287dd0ccac29.txt) (5.5 KB)

in case it helps, conda info gives me that:

active environment : None  
user config file : /home/bioinf/.condarc  
populated config files : /home/bioinf/.condarc  
conda version : 4.4.10  
conda-build version : not installed  
python version : 2.7.14.final.0  
base environment : /home/bioinf/miniconda2 (writable)  
channel URLs : file:///home/bioinf/linux-64  
file:///home/bioinf/noarch  
file:///home/bioinf/miniconda2/pkgs/linux-64  
file:///home/bioinf/miniconda2/pkgs/noarch  
[r/linux-64](https://conda.anaconda.org/r/linux-64)  
[r/noarch](https://conda.anaconda.org/r/noarch)  
[main/linux-64](https://repo.continuum.io/pkgs/main/linux-64)  
[main/noarch](https://repo.continuum.io/pkgs/main/noarch)  
[Anaconda packages for Linux x86\_64 (64-bit)](https://repo.continuum.io/pkgs/free/linux-64)  
[Anaconda packages (noarch)](https://repo.continuum.io/pkgs/free/noarch)  
[r/linux-64](https://repo.continuum.io/pkgs/r/linux-64)  
[r/noarch](https://repo.continuum.io/pkgs/r/noarch)  
[Anaconda extras for Linux x86\_64 (64-bit)](https://repo.continuum.io/pkgs/pro/linux-64)  
[Anaconda extras (noarch)](https://repo.continuum.io/pkgs/pro/noarch)  
[conda-forge/linux-64](https://conda.anaconda.org/conda-forge/linux-64)  
[conda-forge/noarch](https://conda.anaconda.org/conda-forge/noarch)  
package cache : /home/bioinf/miniconda2/pkgs  
/home/bioinf/.conda/pkgs  
envs directories : /home/bioinf/miniconda2/envs  
/home/bioinf/.conda/envs  
platform : linux-64  
user-agent : conda/4.4.10 requests/2.18.4 CPython/2.7.14 Linux/3.16.0-4-amd64 debian/8 glibc/2.19  
UID:GID : 1000:1000  
netrc file : None  
offline mode : False

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [April 12, 2018, 2:06pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/10 "2018-04-12T14:06:40Z")

</div>

Assigned @ebolyen on April 12, 2018, 2:06pm UTC



---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [April 13, 2018, 6:07pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/11 "2018-04-13T18:07:14Z")

</div>

Hey @atg,

It sounds like all of your packages are already in the conda pkg cache? In that case, you probably don't need the last argument where you glob the files `/home/bioinf/miniconda2/pkgs/*.tar.bz2`.

The `--offline` flag on its own should be enough.

Assuming that doesn't work. I would probably give up on trying to get conda to act the way you need via offline/pkg-cache and instead create a custom channel which is pretty straight forward with `conda index`. Then you aren't as reliant on how conda organizes itself internally.

> [@ebolyen](#):
>
> Another avenue you can explore is creating file-system conda channels (called custom channels). It’s a little bit more involved, but if you do this often enough it is probably worthwhile. It’s also more likely to work like you would expect as it’s treated just like any other conda channel: [https://conda.io/docs/user-guide/tasks/create-custom-channels.html](https://conda.io/docs/user-guide/tasks/create-custom-channels.html)

---

<div class="post-metadata">

**Author:** ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)\
**Post date:** [April 13, 2018, 6:07pm UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/12 "2018-04-13T18:07:37Z")

</div>

Unassigned @ebolyen on April 13, 2018, 6:07pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [May 15, 2018, 12:13am UTC](https://forum.qiime2.org/t/qiime2-installation-with-dependencies-downloaded-locally/3536/13 "2018-05-15T00:13:32Z")

</div>

Closed on May 15, 2018, 12:13am UTC

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