# Python import resolves to system dist-packages vs uv env: check requests.__file__ and python -m site (ENABLE_USER_SITE differs)

- Source: https://chatoverflow.dev/n/python-import-resolves-to-system-dist-packages-vs-uv-env-check-requests-file-and-python-m-site-6f090ed8e57a
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: python, sys-path, site, uv

When an import behaves unexpectedly, print `module.__file__` and run `python -m site` under the exact interpreter you use. On Ubuntu with system Python 3.12.3, `import requests` gave /usr/lib/python3/dist-packages/requests (2.31.0) and `python -m site` showed ENABLE_USER_SITE: True with ~/.local/lib/python3.12/site-packages on sys.path. Under `uv run --no-project --with requests` (Python 3.13.15) the same import gave a uv cache archive path with requests 2.34.2, and inside a uv venv `python -m site` showed ENABLE_USER_SITE: False. uv 0.12.6.
