首页 > 编程语言 >Win10 环境下 vscode 没法在终端使用 conda activate 命令来更换 Python 环境的解决方案

Win10 环境下 vscode 没法在终端使用 conda activate 命令来更换 Python 环境的解决方案

时间:2022-10-11 09:44:48浏览次数:43  
标签:shell vscode init activate conda Win10 your

在 vscode 上激活 conda 镜像如报下面错误:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.

To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - cmd.exe
  - 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'.

则需在 vscode 中按如下图所示修改配置才能解决:

即在 vscode 设置页面的搜索框内输入 terminal.integrated.shell.w 即可找到这一配置项,然后在 combox 切换到 Command Prompt 即可。

标签:shell,vscode,init,activate,conda,Win10,your
From: https://www.cnblogs.com/georgechou/p/16778176.html

相关文章

  • VSCode安装教程详细简单版
    https://blog.csdn.net/weixin_43928112/article/details/125813377VSCode插件总结:(rust语言)1.rust-analyzer:语言服务器、自动补全、语法高亮等;2.CodeLLDB:debug功能;3.Ev......
  • vscode的pasteImage的配置
    "pasteImage.path":"${currentFileDir}/imgs/${currentFileName}","pasteImage.basePath":"${currentFileDir}/imgs","pasteImage.forceUnixStyleSeparator"......
  • win10安装wsl
     一、使用LxRunOffline工具安装管理wsl:下载LxRunOffline,lxRunOffline下载最新的发行版本下载wsl离线包,WSL_download下载一个喜欢的WSL发行版本。将下载的wsl包后缀名......
  • vscode settings.json配置项
    安装通用插件1、Prettier-Codeformatter2、Vue3Snippets3、VueLanguageFeatures(Volar)安装项目依赖npminstalleslint-plugin-vue@typescrip......
  • vscode——如何在vscode中运行C/C++
    前言mingw-w64:https://sourceforge.net/projects/mingw-w64/files/mingw-w64/内容安装mingw-w64下载地址x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z:x86_64-8.1......
  • Win10家庭版如何强制开启组策略
    组策略是Windows系统中一个非常重要的功能,经常折腾电脑的朋友都知道,虽然控制面板和设置已经提供了丰富的设置选项,但一些深层次的或者高级的设置都需要在组策略中调整。但是......
  • vscode markdown WYSIWYG 所见即所得编辑和预览
    一直使用Typora编写markdown,随着vscode在工作中使用的越来越多,产生了一个想法:能不能在vscode中写markdown,减少软件的成本?可是vscode官方自带的的markdown体验却一般般,那......
  • 开启Win10强大的“上帝模式”:所有选项、任你设置
    要对Windows系统进行选项调整,用到的基本都是“控制面板”和“设置”这两个组件,但相信不少人都吐槽过有些设置选项隐藏得太深了,即使是老司机都不一定能完全摸清,新手更是无从......
  • 记一次win10 python -m http.server 启动后无法访问的经历
    前言最近需要在win10上使用python创建一个http文件服务(默认端口8000),结果执行了python3-mhttp.server-b0.0.0.0后,发现服务跑起来了,但浏览器无法访问http://loc......
  • win7升级到win10系统后,node13升级为node16,node版本node-sass版本与不匹配,导致出现npm
    1.错误npmERR!codeERESOLVE系统从win7升级到win10,之前的node版本是13.14.0,现在版本是16.17.1。正常的vue程序无法正常运行。从网上查询得知"node-sass":"^4.14.1"需......