How To Fix 'Permission Denied' When Activating venvWritten by: Donovan / Last updated: Jun 24, 2023
Python virtual environments are great for isolating
pip packages for different Python versions.
on how to create a virtual environment – or
I just want to point out that there’s a simple mistake people make when activating a Python virtual environment (after creation).
If you try to execute the
activate binary, you’ll get this message:
<venv>/bin/activate: cannot execute - Permission denied
The reason you’re seeing this message is that it needs to be sourced, not executed.
If you’re using
ksh (OpenBSD default shell), use
. instead of