【发布时间】:2019-10-10 15:11:55
【问题描述】:
我正在尝试在未连接到 Internet 的远程计算机(带有 GPU)上安装一些软件包。
(有些人建议我应该使用 Docker,我可能会这样做,但这是最后一次让它工作的机会)。
仅供参考:我正在关注instructions here。
到目前为止我做了什么:
- 下载 Anaconda
Anaconda3-2019.03-Linux-x86_64.sh文件并安装到远程机器上
$ conda --version
conda 4.6.14
然后从here 下载所需的包并将其移动到远程机器上。
$ ls pkgs-for-anaconda/linux-64/*tensorflow*
pkgs-for-anaconda/linux-64/tensorflow-gpu-1.9.0-hf154084_0.tar.bz2
- 设置一个新通道,即本地文件系统上的文件路径。
$ conda config --prepend channels file:///home/billtubbs/pkgs-for-anaconda
从配置中摘录以确认此方法有效:
channels:
- file:///home/billtubbs/pkgs-for-anaconda
- defaults
- 安装包
$ 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
- 索引包
$ 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]
是不是在 noarch 而不是 linux-64 中查找的问题?
- 尝试安装包
当我使用以下内容创建具有所需包的新环境时:
$ conda create -n tf tensorflow-gpu
我明白了:
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.
我不明白的是它表明我的频道存在。它甚至似乎在寻找正确的版本(1.9.0)。但它说找不到。
为了确认,我做了以下操作:
$ 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
有人知道我做错了什么吗?
更新:
这里是一些输出
$ 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
【问题讨论】:
标签: python command-line conda package-managers