gpt4 book ai didi

ubuntu - 使用 WSL Windows 10 中的 conda

转载 作者:行者123 更新时间:2023-12-03 14:49:25 36 4
gpt4 key购买 nike

我已经安装了conda在我的 Windows 10 环境中。当我尝试从我的 Ubuntu WSL 中使用 conda 时,它会抛出:

CommandNotFoundError:您的 shell 未正确配置为使用“conda activate”。
如果您的 shell 是 Bash 或 Bourne 变体,请使用以下命令为当前用户启用 conda

$ echo ". C:\ProgramData\Miniconda3/etc/profile.d/conda.sh" >> ~/.bashrc

当我这样做时,我的 bash 在重新启动时会引发错误:
cygpath: command not found -bash: /etc/profile.d/conda.sh: No such file or directory
我应该安装 Cygwin 以从 WSL 中使用 conda 吗?

最佳答案

WSL 将安装在您计算机上的主要用户下。
但是您不能使用 WSL 中的 Conda(安装在 Windows 中)。
但是,您始终可以在 WSL 中安装 python 并使用 Windows 文件系统中的代码。
它将位于/mnt 路径中。

关于ubuntu - 使用 WSL Windows 10 中的 conda,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52866376/

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