创建 Conda 环境时出现问题

问题描述 投票:0回答:1

我尝试在 Anaconda Prompt 的命令行中运行以下代码,以从 YML 文件创建虚拟 Python 环境。虚拟环境名为

environment.yml

但是,当我运行下面的代码时,我收到此消息:

CondaValueError: prefix already exists : C:\Users\super\miniconda3\envs\botty
。环境也没有被创建。有谁知道如何解决这个问题吗?

代码

git clone https://github.com/bottytools/botty.git
cd botty
conda env create -f environment.yml
conda activate botty
python src/main.py

环境.yml

name: botty
channels:
  - conda-forge
dependencies:
  - python=3.10
  - pywin32
  - pip
  - leptonica
  - tesseract=5.1.0
  - pkg-config
  - rapidfuzz
  - pip:
    - pyinstaller
    - opencv-python==4.5.5.64
    - transitions
    - mss
    - numpy
    - mouse
    - keyboard
    - beautifultable
    - pytweening
    - requests
    - coverage
    - pytest
    - pytest-env
    - pytest-pythonpath
    - pytest-mock
    - graphviz
    - psutil
    - cryptography
    - pillow
    - discord.py
    - parse
    - dependencies/tesserocr-2.5.2-cp310-cp310-win_amd64.whl
    - typing_extensions
    - colorama
    - dataclasses-json

我已经安装了最新版本的Miniconda和Git,它们都是依赖项。

python git github conda environment
1个回答
0
投票

您有一个名为 botty 的现有 Conda 环境。首先删除该环境。

输入:

conda info --envs
conda env list
查看现有环境列表。如果您看到列出了环境 'botty',要删除此环境,请输入:
conda remove -n botty --all

如果还是无法安装手动删除目录C:\Users\super\miniconda3 nvs otty

然后运行你的脚本

© www.soinside.com 2019 - 2024. All rights reserved.