gpt4 book ai didi

python - 在 Scientific Linux 上激活 Anaconda 环境

转载 作者:太空宇宙 更新时间:2023-11-04 13:00:20 24 4
gpt4 key购买 nike

我刚刚使用 conda create --name py35 python=3.5 anaconda 将 python 3.5 添加到 anaconda 的环境中

我把anaconda的bin、envs、py35的路径依次加到PATH变量里没有效果。

我总是得到同样的错误:

>>> source activate py35
activate: No such file or directory.
>>> activate py35
Error: activate must be sourced. Run 'source activate envname'
instead of 'activate envname'.

Usage: source activate ENV

adds the 'bin' directory of the environment ENV to the front of PATH.
ENV may either refer to just the name of the environment, or the full
prefix path.
>>> cd anaconda/bin
>>> ls | grep activate
activate
activate-global-python-argcomplete
deactivate
>>> source activate py35
Illegal variable name.

我很困惑

编辑:echo $PATH 给出

/local/home/sread/Apps/texlive/2015/bin/x86_64-linux:/local/home/sread/Apps/anaconda:/local/home/sread/Apps/anaconda/bin:/local/home/sread/Apps/texlive/2015/bin/x86_64-linux:/local/home/sread/Apps/anaconda/envs:/local/home/sread/Apps/anaconda/bin:/local/home/sread/Apps/texlive/2015/bin/x86_64-linux:/local/home/sread/Apps/anaconda/envs/py3k:/local/home/sread/Apps/anaconda/bin:/local/home/sread/Apps/texlive/2015/bin/x86_64-linux:/local/home/sread/Apps/anaconda/envs:/local/home/sread/Apps/anaconda/bin:/local/home/sread/Apps/texlive/2015/bin/x86_64-linux:/local/home/sread/Apps/anaconda/bin:/local/home/sread/Apps/texlive/2015/bin/x86_64-linux:/local/home/sread/Apps/anaconda/bin:/star/java/jre/bin:/star/java/bin:/soft/cuter:/soft/cuter/CUTEr.large.pc.lnx.gfo/bin:/soft/sifdec:/soft/sifdec/SifDec.large.pc.lnx.gfo/bin:/local/home/sread/Apps/texlive/2015/bin/x86_64-linux:/local/home/sread/Apps/anaconda/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/soft/bin:/soft/AstroMatic/bin:/star/bin/startcl:/star/bin:/star/starjava/bin

最佳答案

我认为命令需要在系统提示符下运行,而不是 python 提示符 (>>>)。如果您分别在 Windows 或 Linux 上,请尝试在运行“activate envname”或“source activate envname”之前退出 python。

关于python - 在 Scientific Linux 上激活 Anaconda 环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34086002/

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