Skip to content

conda run --name env_name file.py does not work #862

@matte-esse

Description

@matte-esse

When I click cmd+R on a python file

conda run --name env_name file.py

Appears in my terminal. But then the environment clearly isn't activated because it fails to import packages that are in that environment. As you can see below

(bf) ➜  bagflow git:(main) ✗ python file.py
here
(bf) ➜  bagflow git:(main) ✗ conda run --name bf python file.py
Traceback (most recent call last):
  File "file.py", line 1, in <module>
    import pytest
ModuleNotFoundError: No module named 'pytest'

ERROR conda.cli.main_run:execute(49): `conda run python file.py` failed. (See above for error)

This is on a Apple Silicon Mac using miniconda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions