Bill
Bill

Reputation: 11643

Anaconda - can't install package offline after downloading it

I'm trying to install some packages on a remote machine (with GPUs) that is not connected to the internet.

(Some people have suggested I should be using Docker and I may well do that but here's one last chance to get this working).

FYI: I'm following the instructions here.

What I've done so far:

  1. Downloaded Anaconda Anaconda3-2019.03-Linux-x86_64.sh file and installed it on the remote machine
$ conda --version
conda 4.6.14

Then downloaded the desired package from here and moved it to the remote machine.

$ ls pkgs-for-anaconda/linux-64/*tensorflow*
pkgs-for-anaconda/linux-64/tensorflow-gpu-1.9.0-hf154084_0.tar.bz2
  1. Setup a new channel which is the file path on the local file system.
$ conda config --prepend channels file:///home/billtubbs/pkgs-for-anaconda

Excerpt from config to confirm this worked:

channels:
  - file:///home/billtubbs/pkgs-for-anaconda
  - defaults
  1. Install the package
    $ conda install pkgs-for-anaconda/linux-64/tensorflow-gpu-1.9.0-hf154084_0.tar.bz2
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
  1. Index the packages
$ conda index pkgs-for-anaconda/
Subdir: noarch: 100%|████████████████████████████████████| 2/2 [00:00<00:00, 81.80it/s]
(base) [billtubbs@localhost ~]$ ch: 0it [00:00, ?it/s]s]05 [00:00<00:00, 750741.03it/s]

Is the issue that it looked in no noarch instead of linux-64?

  1. Try to install the package

When I use the following to create a new environment with the desired package:

$ conda create -n tf tensorflow-gpu

I get:

Collecting package metadata: done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - tensorflow-gpu -> _tflow_190_select==0.0.1=gpu
  - tensorflow-gpu -> tensorflow==1.9.0

Current channels:

  - file:///home/billtubbs/pkgs-for-anaconda/linux-64
  - file:///home/billtubbs/pkgs-for-anaconda/noarch
  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/linux-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

What I don't understand is that it shows my channel exists. And it even seems to be looking for the right version (1.9.0). But it says it can't find it.

Just to confirm, I did the following:

$ conda search tensorflow-gpu==1.9.0
Loading channels: done
# Name                       Version           Build  Channel             
tensorflow-gpu                 1.9.0      hf154084_0  pkgs-for-anaconda   
tensorflow-gpu                 1.9.0      hf154084_0  pkgs/main 

Anyone know what I am doing wrong?

UPDATE:

Here is some of the output from

$ conda list --show-channel-urls

...

sympy                     1.3                      py37_0    defaults
tblib                     1.3.2                    py37_0    defaults
tensorflow-gpu            1.9.0                hf154084_0    file:///home/billtubbs/pkgs-for-anaconda
terminado                 0.8.1                    py37_1    defaults
testpath                  0.4.2                    py37_0    defaults

Upvotes: 0

Views: 718

Answers (1)

Freddy Daniel
Freddy Daniel

Reputation: 389

I will recommend you that you uninstall the current version of anaconda that you have, when I downloaded the last version of anaconda i got some problems, I remenber that I could'nt install for example tensorflow or matplotlib.. The best version to work with tensorflow or matplotlib is having one anaconda with python 3.6. Try to install Anaconda3-4.4.0-Windows-x86_64 or Anaconda3-4.4.0-Linux-x86_64.sh which was released in 2017-05-26.

Anacoda versions

And then try to install tensorflow, matplotlib, pandas, numpy but before run

conda update conda

To update some packages of anaconda. And you will install those the packages/libraries without problems,

Best Regards. PD: I also tried to install docker however I got more problems than using python with pip, that's why I think anaconda is the best solution.

Upvotes: 1

Related Questions