How to update the entire Anaconda Python distribution offline in Windows?

herrlich10 picture herrlich10 · May 22, 2015 · Viewed 16k times · Source

I use Anaconda Python distribution on a Windows machine without Internet access.

The installation is extremely easy: just download and copy the Anaconda Windows installer and install in standard way.

But when it comes to updating:

  • If I manually download, copy, and update individual packages, it is tedious and prone to error, considering the complicated interdependency among packages.
  • If I uninstall the entire Anaconda and then reinstall a new one (my current approach), I'll lose my personal configurations as well as manually installed packages that are not included in Anaconda installer.

Is it possible to run something like:

conda update Anaconda-2.2.0-Windows-x86_64.exe

to extract and update necessary packages from the all-in-one Windows installer?

I notice the new --offline option provided by the latest conda update command, but it doesn't seem to serve for this purpose...

Answer

asmeurer picture asmeurer · May 22, 2015

In general, things like Anaconda Server are designed to make this sort of workflow easier.

Some suggested workarounds:

  • Reproduce your install on another machine with internet (save conda list --export to a file and conda install --file). Then use conda update on that machine to generate and download the packages. One tip that could be helpful is if you take several conda packages and tar them up into a flat tarball you can use conda to install that tarball and it will install all the packages. Or you can put the packages in the pkgs cache and use the --offline flag.

  • Install the newer Anaconda to a different location and copy the packages from the pkgs cache to your current folder.

Both of these are a bit clunky, but there's no easy way to achieve this without Anaconda Server.