离线时如何安装 conda 环境?

2022-01-10 00:00:00 python conda anaconda

问题描述

我想在没有网络连接的机器上创建一个 conda 环境.到目前为止我所做的是:

I would like to create a conda environment on a machine that has no network connection. What I've done so far is:

在连接到互联网的机器上:

On a machine that is connected to the internet:

conda create -n python3 python=3.4 anaconda

Conda 将所有相关包归档到 Anacondapkgs 中.我把它们放在一个单独的文件夹中,然后把它移到没有网络连接的机器上.该文件夹的路径为 PATHTOAnaconda_py3win-64

Conda archived all of the relevant packages into Anacondapkgs. I put these into a separate folder and moved it to the machine with no network connection. The folder has the path PATHTOAnaconda_py3win-64

我试过了

conda create -n python=3.4 anaconda --offline --channel PATHTOAnaconda_py3

这给出了错误消息

Fetching package metadata:
Error: No packages found in current win-64 channels matching: anaconda

You can search for this package on Binstar with

    binstar search -t conda anaconda

我做错了什么?如何告诉 conda 基于此目录中的包创建环境?

What am I doing wrong? How do I tell conda to create an environment based on the packages in this directory?


解决方案

您可以尝试克隆作为基础环境的 root.

You could try cloning root which is the base env.

conda create -n yourenvname --clone root

相关文章