为什么 Anaconda 源激活不存在?

Why is Anaconda source activate non-existent?(为什么 Anaconda 源激活不存在?)
本文介绍了为什么 Anaconda 源激活不存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我在 Anaconda 中成功创建了两个独立的 Python 环境,但似乎无法激活其中任何一个.我已尝试在 Stackoverflow 上尽可能多地阅读此主题,但没有解决方案能解决我的问题.我在这个问题中添加了评论所要求的信息(Anaconda 环境未激活).

I successfully created two separate Python environments in Anaconda, yet seem to be unable to activate either one of them. I have tried to read up on this topic as much as possible here on Stackoverflow, yet no solution did resolve my issue. I added information asked for by comments in this question (Anaconda Environment Doesnt activate).

尝试激活环境时,控制台输出为 -bash: activate: No such file or directory.

When trying to activate an environment, the console output is -bash: activate: No such file or directory.

which conda 的输出是 /Users/username/anaconda3/bin/conda.type source 的输出是 source is a shell builtin.当尝试 which activate 时,shell 什么也不返回.

The output of which conda is /Users/username/anaconda3/bin/conda. The output of type source is source is a shell builtin. When trying which activate, the shell returns nothing.

在我的 bin 文件夹中,我似乎也没有一个 activate 可执行文件,而只有一个名为 activate-global-python-argcomplete.

In my bin folder, I also seem not to have an activate executable, but only one which is called activate-global-python-argcomplete.

为什么我缺少标准激活文件以及如何最好地解决这个问题?

Why do I lack the standard activate file and how I could resolve this issue best?

推荐答案

我遇到了类似的问题.就我而言,问题与 tcsh 的使用有关,但 activate 仅支持 bashzsh.

I experience a similar problem. In my case, the problem is related to the use of the tcsh, but activate only supports bash and zsh.

您可以使用以下命令检查您当前使用的 shellecho $0.

You can check your current used shell with the command echo $0.

您必须使用兼容的外壳才能使用 source activate 命令.

You have to use a compatible shell in order to use the source activate command.

这篇关于为什么 Anaconda 源激活不存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

python arbitrarily incrementing an iterator inside a loop(python在循环内任意递增迭代器)
Joining a set of ordered-integer yielding Python iterators(加入一组产生 Python 迭代器的有序整数)
Iterating over dictionary items(), values(), keys() in Python 3(在 Python 3 中迭代字典 items()、values()、keys())
What is the Perl version of a Python iterator?(Python 迭代器的 Perl 版本是什么?)
How to create a generator/iterator with the Python C API?(如何使用 Python C API 创建生成器/迭代器?)
Python generator behaviour(Python 生成器行为)