ChatGPT says two things to this “uv is a package manager not a file runner” um uv run seems to be one of the best parts of uv… and that “You’re doing things correctly you are just hitting one of Python’s most notorious pain points: managing import paths cleanly”.
I have read a few tickets saying uv won’t support this so everyone running my project will have to read the README first to get anything to run. Terrible UX.
I have no understanding of python really but very glad I settled on uv. It’s such an improvement user wise over poetry or pip and it’s extremely fast too.
I have one complaint though, I want ./src to be the root of my python packages such that
> from models.attention import Attention
Works if I have a directory called models with a file called attention.py in it (and __init__.py) etc. The only way this seems to work correctly is if I set PYTHONPATH=./src
Surely the environment manager could set this up for me? Am I just doing it wrong?