python - Anaconda - 下载后无法离线安装包
问题描述
我正在尝试在未连接到 Internet 的远程计算机(带有 GPU)上安装一些软件包。
(有些人建议我应该使用 Docker,我可能会这样做,但这是最后一次让它工作的机会)。
仅供参考:我正在按照此处的说明进行操作。
到目前为止我所做的:
- 下载 Anaconda
Anaconda3-2019.03-Linux-x86_64.sh
文件并将其安装在远程机器上
$ conda --version
conda 4.6.14
然后从这里下载所需的包并将其移动到远程机器上。
$ 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
解决方案
我会建议你卸载你拥有的当前版本的 anaconda,当我下载最后一个版本的 anaconda 时我遇到了一些问题,我记得我无法安装例如 tensorflow 或 matplotlib .. 使用的最佳版本tensorflow 或 matplotlib 有一个 anacondapython 3.6.
尝试安装Anaconda3-4.4.0-Windows-x86_64
或Anaconda3-4.4.0-Linux-x86_64.sh
发布于2017-05-26.
然后尝试安装 tensorflow、matplotlib、pandas、numpy 但在运行之前
conda update conda
更新 anaconda 的一些软件包。您将毫无问题地安装这些软件包/库,
此致。PD:我也尝试安装 docker,但是我遇到的问题比使用 python 和 pip 更多,这就是为什么我认为 anaconda 是最好的解决方案。
推荐阅读
- linux - Linux 命名管道 - MKFIFO 查询
- java - 春季用jsp记录页面
- python - 我应该在定义函数的模块中还是在 Python 中调用函数的模块中定义 try-except ?
- java - 我想取出 JAVA 中 BigInteger 中存储的大数的最后一位
- javascript - 如果数据属性匹配 jQuery,则隐藏 div
- angularjs - Angular 更新 ng-model 不带引号
- openweathermap - 只获取白天和黑夜的天气预报
- r - 根据选定的日期范围显示 rhandsontable 输出
- php - PHP - 提取数组的前 3 个元素 -> 随机播放 -> 并将它们添加回原点。大批
- javascript - TypeError:无法读取 q-ajax-bar 中未定义的属性“$on”