gpt4 book ai didi

python - conda激活没有效果

转载 作者:太空宇宙 更新时间:2023-11-03 20:33:25 25 4
gpt4 key购买 nike

尝试在我 friend 的电脑上安装 anaconda 并遇到了这个问题[我修复了它,但找不到答案,所以我想将其发布在这里]PC 只是无法加载 anaconda 环境,当你输入时

>>conda activate base
>>conda info

active environment : None

python 可以工作,但有此警告

>> python
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 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

Type "help", "copyright", "credits" or "license" for more information.
>>>

最佳答案

听起来像 your own answer使用自定义代码 - 将 Conda 激活代码添加到 PowerShell 的配置文件(初始化文件),$PROFILE - 已经预装 condainit命令:

conda init powershell

参见the docs或运行conda init --help .

但是请注意,似乎有 an issue当 Conda 以这种方式全局初始化时,激活另一个基础环境。

2019 年 3 月链接问题中的评论指出:

In the meantime, you should be able to conda install powershell_shortcut to use the alternative way that does not require conda init. It has not seen much testing, so any feedback you have is welcome and appreciated.

关于python - conda激活没有效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57332987/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com