简体   繁体   English

康达找不到环境

[英]Conda can't find environment

I cloned an Otree project from a colleague via GitHub and want to set up the survey.我通过 GitHub 从同事那里克隆了一个 Otree 项目,并想设置调查。 When i follow her instructions by typing conda activate otree_env i get the error: Could not find conda environment: otree_env .当我按照她的指示输入conda activate otree_env ,我收到错误消息:找不到 conda 环境:otree_env

When i type the complete path, like conda activate /home/path/to/environment/otree_env , i get the error: Not a conda environment: home/path/to/environment/otree_env .当我键入完整路径时,例如conda activate /home/path/to/environment/otree_env ,我收到错误: Not a conda environment: home/path/to/environment/otree_env

It seems conda does not discover the environment as conda info --envs doesn't list the otree environment. conda 似乎没有发现环境,因为conda info --envs没有列出 otree 环境。

Can anybody help me out?有人可以帮帮我吗?

Unexpectedly I had a similar problem in Windows in Visual Studio Code terminal when I run activate C:\...\myEnvironmentFolder with the message Could not find conda environment: C:... The following command helped me:出乎意料的是,当我运行activate C:\...\myEnvironmentFolder时,我在Visual Studio Code终端的Windows中遇到了类似的问题,并显示消息Could not find conda environment: C:...以下命令帮助了我:

source C:/myPath/Anaconda3/etc/profile.d/conda.sh

Then running activate C:\...\myEnvironmentFolder gave the desired effect然后运行activate C:\...\myEnvironmentFolder给出了预期的效果

If you have the problem like this in cmd console , then, probably, you need to set the path in如果你在cmd console中遇到这样的问题,那么,可能你需要设置路径

Control panel -> System -> Advanced system settings -> User / System variables -> Path -> Edit -> New ->
and add
C:\ProgramData\Anaconda3\Scripts
C:\ProgramData\Anaconda3
C:\ProgramData\Anaconda3\Library\bin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM