<#19428 Pex does not add bin folder to path> Issue...
# github-notifications
c
#19428 Pex does not add bin folder to path Issue created by idan-at Describe the bug Pex
PATH
does not include the virtual environment
bin
folder. Code to reproduce:
Copy code
# BUILD
python_sources()

python_requirement(
  name="req",
  requirements=["ninja"]
)

pex_binary(
  name="bin",
  entry_point="main.py"
)
Copy code
# main.py
import subprocess

subprocess.run(['ninja', '--help'])
Running the
bin
target raises a
FileNotFoundError: [Errno 2] No such file or directory: 'ninja'
exception. Pants version 2.16.0 OS MacOS Additional info When using virtual env,
activate
adds the
<virtual-env>/bin
folder to
PATH
. This allows the program to run
subprocess.call
on any binary that was packed with one of the program dependencies. pantsbuild/pants