logoalt Hacker News

kristianpyesterday at 11:20 PM0 repliesview on HN

If you want to manually manage envs and you're using conda, you can activate the env in a shell wrapper for your python script, like so (this is with conda)

    #!/usr/bin/env bash
    eval "$(conda shell.bash hook)"
    conda activate myenv
    python myscript
Admittedly this isn't self contained like the PEP 723 solution.