# general


09/03/2020, 3:02 PM
I just discovered another issue. There is a script S1 depending on the package A. The S1 and A are both within my project. The S1 downloads another script S2 (that also imports something from A) and runs it as a subprocess. Unfortunately, it seems that S2 can't import from A:
Copy code
ModuleNotFoundError: No module named 'A'
I tried running S1 with ./pants run S1 as well as "./dist/S1.pex" with the same result. How can this be solved? Maybe it is just a matter of PYTHONPATH or something like that? I thought that pex is "just" virtual environment so anything that runs within it should be able to import anything that is there 🙂 This can be "solved" by deploying packages through pypi but we also need to build docker images for our scripts and it would be nice if we can just copy one pex file into each docker image. Also, being able to easily test this functionality during development would be nice.