Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv python install at fixed location? #7710

Open
mikeckennedy opened this issue Sep 26, 2024 · 4 comments
Open

uv python install at fixed location? #7710

mikeckennedy opened this issue Sep 26, 2024 · 4 comments

Comments

@mikeckennedy
Copy link

mikeckennedy commented Sep 26, 2024

Hi team,

I'm looking to rework the Talk Python installing Python guide to recommend uv rather than the myriad of options needed for all the platforms now.

One thing that seems clunky for uv python install is that I don't see a way to make a particular Python version the default one.

I'm not suggesting taking over the system Python or anything like that. But since each install managed by uv has a very specific path, e.g.:

.local/share/uv/python/cpython-3.12.6-macos-aarch64-none/bin/

Any update to the version (even build number) means whatever path you set in your system will become invalid.

For example, if we could uv python install 3.12.6 --primary or something, and have uv put a link or copy in some well known location such as .local/share/uv/python/primary then we can add that to the top of the path if we wish and when we run python/python3 it'll always find this one we designate as primary.

Any thinking along these lines?

BTW, yes, I know uv is venv-first and that's great. But if we are using it get Python on machines for super beginners, having the option to just type python to get a REPL and that sort of thing would be nice instead of full blown installers.

@zanieb
Copy link
Member

zanieb commented Sep 26, 2024

I think you're sort of looking for #6265

@mikeckennedy
Copy link
Author

Hi @zanieb Yes, sort of. As long as we can get the shim at the very tip of the path. Xcode put Python in my path (3.9), Homebrew put 3.12 in my path. But I don't want either of those as the authoritative python for me. I'd like whatever I do from uv python install to be the one.

@zanieb
Copy link
Member

zanieb commented Sep 26, 2024

We can't necessarily control what the tip of your path is, that's up to how you've configured your shell. We can warn if it's not going to be at the front though.

@mikeckennedy
Copy link
Author

Hey @zanieb

Of course you can't control our paths, that's what ever we do to our machines.

My request here is that uv provide some mechanism to use a stable directory structure for a selected version of Python that it installed. In this way, we can put something fixed, rather than something that changes bi-monthly, into rc files or windows path settings that will stay working as Python evolves (3.13.0 -> 3.13.1, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants