79073126

Date: 2024-10-10 07:10:02
Score: 0.5
Natty:
Report link

Adding

_OLD_VIRTUAL_PYTHONPATH="$PYTHONPATH"
export PYTHONPATH="$VIRTUAL_ENV:/path/to/project:$PYTHONPATH"

and the corresponding revert in deactivate()

if ! [ -z "${_OLD_VIRTUAL_PYTHONPATH+_}" ] ; then
    PYTHONPATH="$_OLD_VIRTUAL_PYTHONPATH"
    export PYTHONPATH
    unset _OLD_VIRTUAL_PYTHONPATH
fi

to the venv activation script and running run.py directly from entry_point (in that way specifically, not from project root) did the trick while being the least intrusive option.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: bqback