2
votes

I know through pip I can download Python packages using the below command. But "pip install" is breaking my internal package dependencies.

When I do:

pip download <package-name> -d <download-path> 

This is supposed to download packages along with their dependencies.

I tried and failed to find this feature for Conda.

Please let me know if there's a way to download python packages along with their dependencies through conda and install the latter offline in the virtual environment.

I need this method because our client restricted access to Pypi and the Anaconda repository.

1

1 Answers

2
votes

Sounds like you are looking for the --download-only flag. From conda install --help:

--download-only       Solve an environment and ensure package caches are
                      populated, but exit prior to unlinking and linking
                      packages into the prefix.

The "solve and environment" part indicates that it will include all dependencies.

The --offline flag could also be helpful for the latter time when you try installing. This will force Conda to attempt to use only the cached packages to satisfy package specifications.