gpt4 book ai didi

python - 在 Windows 中*持久*激活 Anaconda Python 环境

转载 作者:行者123 更新时间:2023-12-04 11:42:23 25 4
gpt4 key购买 nike

我不知道如何设置我的 Windows 7 机器,以便它“总是”找到我的 Python 3.6 Anaconda 环境,这不是我的根环境。每次我想使用该环境时,我都不想在 cmd 窗口中执行“激活...”。此外,开始菜单中有一个 Spyder 项目,用于 3.6(与默认环境分开),它不起作用。我假设是因为环境问题。

非常感谢一个强大的解决方案。

戴夫

最佳答案

我有一个类似的问题,每次我打开 anaconda 提示时,它都以“base”作为默认环境开始。但问题是我主要在不同的自定义环境中工作,所以每次我想使用它时都必须激活它。
这是我找到的在 Windows 10 系统上自动激活我的首选环境的解决方案:

  • Open anaconda prompt & use 'conda env list' to find the location of the environment you wish to use.enter image description here

  • Go to the start menu, right-click 'Anaconda Prompt' and go to file location.enter image description here

  • Create a copy of its shortcut

  • Open its properties & change the target to the location of your preferred environment.

    enter image description here


现在,每次您通过此快捷方式打开 anaconda prompt 时,它都会自动加载您选择的环境。

关于python - 在 Windows 中*持久*激活 Anaconda Python 环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43081098/

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