-
Hi there, new to PEX! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You will only be able to do this with a For example, using $ cat src/exe.py
import subprocess
def main():
subprocess.check_call(["pytest", "--version"])
subprocess.check_call(["which", "pytest"])
$ pex pytest --venv prepend -o my.pex -D src -e exe:main
$ ./my.pex
pytest 6.2.4
/home/jsirois/.pex/venvs/efadb32f637132f9dc2de837e85c42205c95e130/2d1d404c3de23b1810386195be7410700b1feb14/bin/pytest |
Beta Was this translation helpful? Give feedback.
-
thx. I think another solution I found out from the web is to do |
Beta Was this translation helpful? Give feedback.
You will only be able to do this with a
--venv
mode pex and the append or prepend option.For example, using
--venv prepend
which prepends all console scripts found in the PEX to the PATH: