*PEX `inherit_path` not working (possibly user err...
# general
m
PEX
inherit_path
not working (possibly user error).
Hello, I am trying to build a PEX file with only source code and no dependency to speed up deployment. I am planning to create a deployment PEX following advice from @broad-processor-92400. When I create a PEX file for first party source code and enable
inherit_path="prefer"
it doesn't pick up packages that is already installed in the system.
Copy code
ModuleNotFoundError: No module named 'uvicorn'
The
PEX-INFO
has
"inherit_path": "prefer"
and the Python interpreter has
uvicorn
installed. I must be missing something obvious as this post seems to show that it should work. Could anyone share some insights please?
b
Can you confirm that
python -c 'import uvicorn'
works?
m
Yeah, I am sorry Huon. I think this is a caching issue... when I delete the pex file and generate it again it somehow works. I am so sorry to waste your time...
b
no worries 😄 glad it works