Conda 环境激活错误:“系统找不到指定的路径。” (窗口 10)

时间:2021-03-29 08:03:36

标签: python anaconda conda anaconda3

安装 anaconda3 后,我使用 Anaconda 命令提示符启动了 jupyter notebook,它运行良好。后来已经关闭了我的计算机,在启动时我尝试通过 Anaconda 命令提示符打开 jupyter notebook,它打开另一个终端并显示以下警告消息。

Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning: This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.io/activation

我去了 https://conda.io/activation,它给了我一个在 Anaconda 提示符下运行的命令

c:\Anaconda3\Scripts\activate base 

此命令返回

C:\Users\Daniel>c:\Anaconda3\Scripts\activate

The system cannot find the path specified.

我在 https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#path-error 上找到了解决方案 Solution image 但我不知道实施它。 我还尝试从命令提示符获取 python 和 conda 的路径。 conda 的路径是正确的,而 '>where python' 返回“信息:找不到给定模式的文件。”

C:\Users\Daniel>where python
INFO: Could not find files for the given pattern(s)

2 个答案:

答案 0 :(得分:0)

您在该计算机上的帐户似乎是“Daniel”,因此这可能是您需要运行的命令:

C:\Users\Daniel\Anaconda3\Scripts\activate base

答案 1 :(得分:-1)

您的 Anaconda PATH 可能存在一些问题。您需要将 Anaconda 和 Anadconda 脚本添加到您的 PATH 环境变量中。这可以在 windows power shell 或命令提示符中完成。

只需在终端中输入 set PATH=%PATH%;C:\Anaconda3;C:\Anaconda3\Scripts\,看看是否有效。