-
Notifications
You must be signed in to change notification settings - Fork 330
Open
Labels
Description
Bug description
Packages installed with pip under bash cannot be found under zsh.
Steps to reproduce
- Open an empty workspace.
- $ pip install flask (under bash)
- Create a new zsh terminal. (directly from the VSCode, not from an existing bash)
- $ python -c "import flask" (under zsh)
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'flask'
Expected behavior
Packages should be available regardless of shell type.
Example repository
https://github.com/xzmeng/xzmeng
Anything else?
export PYTHONUSERBASE="$GP_PYENV_MIRROR/user/current" |
COPY --chown=gitpod:gitpod python_hook.bash $HOME/.bashrc.d/60-python |
I guess the PYTHONUSERBASE environment variable is to allow the packages installed by pip to remain after the workspace is restarted, but if it is only set in bash, other kinds of shells will have inconsistencies.
Is it feasible to put this process in pyenv shims , so that any we don't care about shell types ?