<#2112 How to specify a python interpreter in a vi...
# github-notifications
c
#2112 How to specify a python interpreter in a virtualenv on the run using PEX_PYTHON? New discussion created by zeyuwang615 Hi, there! I am trying to run a packed python .pex file with the command
./xxx.pex main.py
. However, I just discover that there are a few necessary packages missing in the pex file. So I try to specify the custom python interpreter in a virtualenv with all the necessary packages with the
PEX_PYTHON
environment variable. Strangely,
PEX_PYTHON=/path/to/venv/python ./xxx.pex main.py
does not work, and so does
/path/to/venv/python ./xxx.pex main.py
. I wonder how I can specify the python environment or add the necessary packages without needing to regenerate or change the .pex file? Thanks a lot! pantsbuild/pex