【After Anaconda installation,conda can not run】

After Anaconda installation,conda can not run

Questions

After Anaconda installation, conda command fails with "ImportError: no module named conda.cli"

After I open "Anaconda Prompt",the specific error is as follows:

bash 复制代码
Traceback (most recent call last):
  File "D:\Tools_SoftWare\Anaconda3\install\Scripts\conda-script.py", line 11, in <module>
    from conda.cli import main
ModuleNotFoundError: No module named 'conda'
Failed to run 'conda activate D:\Tools_SoftWare\Anaconda3\install'.

Solution

You need to delete the 'PYTHONHOME' and 'PYTHONPATH' environment variables.

I forgot the purpose of these two environment variables, but their presence does conflict with Anaconda.

PYTHONHOME

C:\Users\12114\AppData\Local\Programs\Python\Python312

PYTHONPATH

C:\Users\12114\AppData\Local\Programs\Python\Python312

The same question can be referred to

https://stackoverflow.com/questions/19825250/after-anaconda-installation-conda-command-fails-with-importerror-no-module-na

相关推荐
lxw184491251410 小时前
Python uv 完整使用教程
python·conda·pip·uv
拾贰_C2 天前
【Conda | .venv | 虚拟环境】 conda构建项目内的虚拟环境.venv以及选择项目虚拟环境的原因所在
conda
小大宇2 天前
Python 集成 Conda
开发语言·python·conda
赶紧写完去睡觉4 天前
Anaconda 创建虚拟环境与使用
python·pycharm·conda
迷途呀7 天前
conda使用指南
python·深度学习·机器学习·pycharm·conda
怪兽学LLM9 天前
Conda 环境依赖导出指南:四种常用方法总结
conda
QH_ShareHub10 天前
GPU 完整运行过程:驱动、CUDA Toolkit、Conda、Python PyTorch 与 R torch
pytorch·python·conda
liang899912 天前
Anconda常用命令
linux·人工智能·conda
齐昭王城13 天前
Conda 环境一键搬家:用 conda-pack 打包带走,连网都不用
conda
HAPPY酷17 天前
【ROS2】 Conda 环境搭建(命令行版)
linux·运维·python·ubuntu·机器人·conda