当前位置:   article > 正文

解决VScode激活conda环境报错:usage: conda-script.py [-h] [--no-plugins] [-V] COMMAND ...

usage: conda-script.py [-h] [--no-plugins] [-v] command ... conda-script.py:

1.使用VScode运行Python时提示以下错误:

PS C:\Users\86158> activate
PS C:\Users\86158> conda activate yolov8
usage: conda-script.py [-h] [--no-plugins] [-V] COMMAND ...
conda-script.py: error: argument COMMAND: invalid choice: 'activate' (choose from 'clean', 'compare', 'config', 'create', 'info', 'init', 'install', 'list', 'notices', 'package', 'remove', 'uninstall', 'rename', 'run', 'search', 'update', 'upgrade', 'build', 'content-trust', 'convert', 'debug', 'develop', 'doctor', 'index', 'inspect', 'metapackage', 'render', 'skeleton', 'verify', 'server', 'repo', 'token', 'env', 'pack')
PS C:\Users\86158> 
  • 1
  • 2
  • 3
  • 4
  • 5

2.在终端窗口可以发现默认终端是PowerShell。在这里插入图片描述
3.选择第二个:“Command Prompt”可以看到环境激活正常。在这里插入图片描述
4.再次选择“选择默认配置文件”,在弹出的配置菜单中选择:“Command Prompt”,否则下次运行仍然会使用“PowerShell”打开终端。在这里插入图片描述
选择:“Command Prompt”在这里插入图片描述

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号