Skip to content

PDM Automatic Activation Question #1228

Answered by frostming
SystemTheory asked this question in Q&A
Discussion options

You must be logged in to vote

If possible how do I configure PDM to work like pyenv virtualenv that activates the environment or finds the pep582 packages automatically when inside the project folder and deactivates when outside the folder?

If you mean to auto-activate the shell so that executables inside the venv are brought to the front in the PATH, PDM doesn't provide such ability. You can still create venv with pyenv and use it to activate for you. PDM will respect the VIRTUAL_ENV environment variable. Just make sure you don't store the python path in .pdm.toml, to delete it: pdm config -ld python.path.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SystemTheory
Comment options

Answer selected by SystemTheory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants