Skip to content

An error occurs when operate a Conda environment that contains spaces in the path. #103

@dunxuan

Description

@dunxuan

VSCode's Python Environments outputs:

2024-12-29 19:50:50.674 [error] Failed to delete conda environment: Error: Failed to run "conda env remove --yes --prefix c:\OneDrive - MSFT\Code\JDComment_Spider\.conda":
 usage: conda-script.py [-h] [-v] [--no-plugins] [-V] COMMAND ...
conda-script.py: error: unrecognized arguments: - MSFT\Code\JDComment_Spider\.conda

2024-12-29 20:13:14.956 [error] Error installing packages Failed to run "conda install --prefix c:\OneDrive - MSFT\Code\Python\.conda --yes requests":
 usage: conda-script.py [-h] [-v] [--no-plugins] [-V] COMMAND ...
conda-script.py: error: unrecognized arguments: requests

And like create or some else operate the env.

Enclosing the path in double quotes should solve the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions