CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.

简介: 该问题是因为conda环境没有被激活的原因

问题描述如下:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>
Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.

解决方案如下:

# 激活 anaconda 环境
 source activate
# 退出 anaconda 环境
 source deactivate
pytorch仓库的创建
#创建虚拟环境
conda create -n xxx python=3.6
#删除虚拟环境
conda remove -n your_env_name(虚拟环境名称) --all
#激活虚拟环境
conda activate your_env_name
#退出虚拟环境
conda deactivate
相关文章
|
Shell Linux C++
报错:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘. 问题解决
报错:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘. 问题解决
337 0
|
Shell Linux
解决脚本文件无法执行conda命令的问题:CommandNotFoundError: Your shell has not been properly configured to use
使用Linux系统时,有时候希望利用一个脚本执行多条命令来节省时间,其中如果安装有anaconda,需要切换环境或者关闭conda环境,按道理说,在终端里可以通过命令
1282 0
|
Shell Windows
[记录condaのbug] CommandNotFoundError: Your shell has not been properly configured to use ‘conda...
[记录condaのbug] CommandNotFoundError: Your shell has not been properly configured to use ‘conda...
[记录condaのbug] CommandNotFoundError: Your shell has not been properly configured to use ‘conda...
|
Shell
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案
1913 0
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案
|
Shell
【已解决】CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.
【已解决】CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.
382 0
|
15天前
|
Shell Linux
【linux】Shell脚本中basename和dirname的详细用法教程
本文详细介绍了Linux Shell脚本中 `basename`和 `dirname`命令的用法,包括去除路径信息、去除后缀、批量处理文件名和路径等。同时,通过文件备份和日志文件分离的实践应用,展示了这两个命令在实际脚本中的应用场景。希望本文能帮助您更好地理解和应用 `basename`和 `dirname`命令,提高Shell脚本编写的效率和灵活性。
78 32
|
4月前
|
Shell
一个用于添加/删除定时任务的shell脚本
一个用于添加/删除定时任务的shell脚本
154 1
|
3月前
|
Shell Linux 测试技术
6种方法打造出色的Shell脚本
6种方法打造出色的Shell脚本
114 2
6种方法打造出色的Shell脚本
|
3月前
|
XML JSON 监控
Shell脚本要点和难点以及具体应用和优缺点介绍
Shell脚本在系统管理和自动化任务中扮演着重要角色。尽管存在调试困难、可读性差等问题,但其简洁高效、易于学习和强大的功能使其在许多场景中不可或缺。通过掌握Shell脚本的基本语法、常用命令和函数,并了解其优缺点,开发者可以编写出高效的脚本来完成各种任务,提高工作效率。希望本文能为您在Shell脚本编写和应用中提供有价值的参考和指导。
145 1
|
3月前
|
Ubuntu Shell 开发工具
ubuntu/debian shell 脚本自动配置 gitea git 仓库
这是一个自动配置 Gitea Git 仓库的 Shell 脚本,支持 Ubuntu 20+ 和 Debian 12+ 系统。脚本会创建必要的目录、下载并安装 Gitea,创建 Gitea 用户和服务,确保 Gitea 在系统启动时自动运行。用户可以选择从官方或小绿叶技术博客下载安装包。
142 2