Skip to content
13 changes: 13 additions & 0 deletions docs/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@ any Poetry commands that expect to manipulate an environment.
To run your script simply use `poetry run python your_script.py`.
Likewise if you have command line tools such as `pytest` or `black` you can run them using `poetry run pytest`.

{{% note %}}
If managing your own virtual environment externally, you do not need to use `poetry run` or `poetry shell` since
you will, presumably, already have activated that virtual environment and made available the correct python instance.
For example, these commands should output the same python path:
```shell
conda activate your_env_name
which python
poetry run which python
poetry shell
which python
```
{{% /note %}}

### Activating the virtual environment

The easiest way to activate the virtual environment is to create a nested shell with `poetry shell`.
Expand Down