I would like to set PYTHONIOENCODING
env variable to be permanently set to utf-8
in a particular virtualenv
.
So whenever I activate my virtualenv using
source py/bin/activate
my setting of PYTHONIOENCODING=utf-8
will be automatically activated as well.
I followed virtualenv
manual and tried the following
echo $PYTHONIOENCODING ## expected unset
env PYTHONIOENCODING=utf-8 virtualenv py --python=/usr/bin/python3.6
#Running virtualenv with interpreter /usr/bin/python3.6
#...
echo $PYTHONIOENCODING ## expected unset
source py/bin/activate
echo $PYTHONIOENCODING ## expected to be set here
but it didn't work (expected to last command return utf-8
).
How can this be achieved?