You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@ubuntu:~# pip --version
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
root@ubuntu:~# python2.7 --version
Python 2.7.6
root@ubuntu:~# uname -a
Linux ubuntu 4.8.3-x86_64-linode76 #1 SMP Thu Oct 20 19:05:39 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:~# pip3 --version
pip 9.0.1 from /usr/local/lib/python3.4/dist-packages (python 3.4)
root@ubuntu:~# python3 --version
Python 3.4.3
Description:
I have a Debian package that has a postinst script that create a virtual environment, activates it, then installs some packages.
What I've run:
$ dpkg -i <my-deb>
...
...
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in venv/bin/python3
Also creating executable in venv/bin/python
Installing setuptools, pip...done.
venv/bin/activate: line 13: _OLD_VIRTUAL_PYTHONHOME: unbound variable
The text was updated successfully, but these errors were encountered:
I found the problem. It was an errant set -u floating around somewhere. Since the script expects the shell to allow undefined variables, I would recommend adding a set +u to the top to ensure that nothing breaks in other environments.
This is closely related to pypa/virtualenv#150 and would have being avoided by using vate the virtual environment using a simple strict bash test.
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
source .venv/bin/activate
This would use the strict mode to test the activate script. My workaround line is endlessly growing PS1="${{PS1:-}}" _OLD_VIRTUAL_PATH="${{_OLD_VIRTUAL_PATH:-}}" _OLD_VIRTUAL_PYTHONHOME="${{_OLD_VIRTUAL_PYTHONHOME:-}}" source "$VENV/bin/activate" .... but now I get line 22: ZSH_VERSION: unbound variable....
Full system details.
Description:
I have a Debian package that has a
postinst
script that create a virtual environment, activates it, then installs some packages.What I've run:
The text was updated successfully, but these errors were encountered: