1

I have a requirements file that describes the conda packages I need. These are required dependencies in a script I want to run. The script needs to run on a machine that is not connected to a network or internet. Therefore, I have decided to use download-only as explained here.

This is not working for me. When I choose just one dependency to download, I get an error. This is my command-line statement:

conda install --download-only grpcio=1.35.0

This is the error I get:

CondaExitZero: Package caches prepared. UnlinkLinkTransaction cancelled with --download-only option

Apparently, the download-only is in this cases helps me to cancel the download.... That is not what I want. I want to download the full dependency chain in order to use it in an offline environment.

How do I do that?

merv
  • 53,208
  • 11
  • 148
  • 196
Daan
  • 1,921
  • 1
  • 28
  • 56
  • Having a second look at this, are you sure it didn't download? I.e., check your package cache for the `tar.gz` file? Or is the issue that the dependencies aren't also downloaded? If the latter is the case, then the linked answer should be sufficient. – merv May 09 '22 at 23:31

1 Answers1

0

Please file a bug report on the Conda repository, since this appears that it shouldn't be happening. I suspect the issue is that for download-only transactions, Conda still determines that a package might need to be removed in order to eventually install the requested package. That shouldn't be necessary, so I'd call that a bug.

In the meantime, either try creating a new environment and then using the --download-only flag with that environment activated. Alternatively, this answer shows how to download raw packages for a full solve, ignoring any existing package cache.

merv
  • 53,208
  • 11
  • 148
  • 196