Install anaconda library from a local source

Question:

I have been trying to install pymc for some time on a Windows PC behind a very complicated proxy; effectively making this an installation on a computer not connected to the internet. I have tried – unsuccessfully – to set a proxy in the condarc file but I still get error messages

conda install -c https://conda.binstar.org/pymc pymc
Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

Asked By: Noel Evans

||

Answers:

To solve this, you need to download the tar file (even if using Windows) that the installer is trying to fetch and then use offline mode:

Use this command (which will throw an error), to determine the file to be downloaded:

>conda install -c https://conda.binstar.org/pymc pymc
Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
....
Solving package specifications: ......................

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pymc-2.3.5                 |      np110py35_0         402 KB  defaults

The following NEW packages will be INSTALLED:

    pymc: 2.3.5-np110py35_0 defaults

Proceed ([y]/n)? y

Fetching packages ...
Could not connect to https://repo.continuum.io/pkgs/free/win-64/pymc-2.3.5-np110py35_0.tar.bz2
... [error message continues]...

Now download the tar file mentioned in the error message:

https://repo.continuum.io/pkgs/free/win-64/pymc-2.3.5-np110py35_0.tar.bz2

And then run this command with the path to the tar file:

>conda install --offline C:pymc-2.3.5-np110py35_0.tar.bz2
Answered By: Noel Evans

Just of notes: “-c conda-forge” might be handy for some other packages. For example:

conda install -c conda-forge python-levenshtein
Answered By: Helene

Adding to the solution above. Anyone met “SSL verification error” can just turn the verification step off temporarily in ~/.condarc

channels:
  - defaults
ssl_verify: true

In this way, you could install from your local hub.

Answered By: limtete

I was not able to run offline installation in Anaconda (on Win10) because Anaconda always tried to connect to remote channels or collecting metadata process failed.
To solve this I had to:

  1. Download requested module as bz2 file (or convert tar.gz into tar.bz2)
  2. Run Anaconda prompt (ev. navigate to folder with bz2 file)
  3. Run offline installation with conda install path-to-bz2, i.e conda install zeep-4.0.0.tar.bz2
Answered By: Lukas
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.