Fury0508 commented on PR #60728: URL: https://github.com/apache/airflow/pull/60728#issuecomment-3813683360
@jason810496 I'm working on implementing the isolated temp venv but running into an issue I can't figure out. Here's what I've done so far: 1. Create temp venv with `python -m venv` 2. Export non-dev deps: `uv export --no-dev --no-hashes -o requirements.txt` 3. Install them: `pip install -r requirements.txt` in the temp venv 4. Install Airflow itself: `pip install -e /opt/airflow` in the temp venv 5. Run validation function as subprocess using temp venv's python But when the subprocess tries to import the validation function, it fails with: ``` ModuleNotFoundError: No module named 'jsonpath_ng' ``` Even though I can verify the packages are installed in the temp venv. The issue seems to be that the script has module-level imports like `from jsonpath_ng.ext import parse` at the top, and these fail before the function even runs. I tried explicitly installing the script's direct dependencies (`jsonpath_ng`, `rich`, `tabulate`, etc.) but still hitting the same issue. Am I approaching the temp venv creation wrong? Should I be using `uv sync` differently, or is there a specific way to install Airflow + its dependencies in the temp venv that I'm missing? Any guidance would be helpful - I feel like I'm close but missing something about how to properly set up the isolated environment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
