简体   繁体   中英

Conda can't activate environment

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users>conda env list
# conda environments:
#
deepdream                    C:\Users\AppData\Local\Continuum\Anaconda32\env
s\deepdream
pd16.2                     C:\Users\AppData\Local\Continuum\Anaconda32\env
s\pd16.2
root                  *  C:\Users\AppData\Local\Continuum\Anaconda32


C:\Users>activate deepdream
No environment named "deepdream" exists in C:\Users\AppData\Local\Continuum\Anaconda32\envs

C:\Users>

I've made an environment for the deepdream code and I'm unable to activate this through the command prompt. Seems like conda recognizes it as an environment, but activating it fails

Any ideas?

I don't know why, but the folder containing your environments is env but conda is looking for a folder called envs - you have two options:

  1. Rename the env folder to envs
  2. set the CONDA_ENVS_PATH environment variable to point to your path.

I would recreate that environment. Sometimes, if something goes wrong during package installation, this can result in a broken environment configuration, eg missing/invalid files.

The activate script looks for a few subdirectories (and possibly more things) to decide if the given directory is a valid environment.

It is hard to diagnose your fault remotely, so I would suggest that you recreate that environment (simply rename the old folder).

If you want to diagnose the error, compare those two directories afterwards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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