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

Allow "uvx python" to execute Python like "uv run python" #10122

Closed
ksamuel opened this issue Dec 23, 2024 · 2 comments
Closed

Allow "uvx python" to execute Python like "uv run python" #10122

ksamuel opened this issue Dec 23, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@ksamuel
Copy link

ksamuel commented Dec 23, 2024

Right now, if you run uvx python, it can fail. Even uvx -p 3.11 python will fail to start a Python shell on Windows or Ubuntu because the command doesn't map to a python executable.

However, uv run python works, no matter where you execute it.

It's counter-intuitive, one would expect you can run the installed you installed with uv from uvx.

What's more, it would be a useful feature to be able to do uvx -p 3.12 --with pendulum python to test how this lib works in python 3.12 quickly.

Right now, one has to do uvx -p 3.12 --with pendulum ipython which is fine if you are familiar with the Python ecosystem and uv limitations, but probably not for beginners, for whom uv is the biggest boon.

@FishAlchemist
Copy link
Contributor

FishAlchemist commented Dec 23, 2024

Are you in need of such a function

uvx -p 3.12 --from pendulum python

https://docs.astral.sh/uv/guides/tools/#commands-with-different-package-names
Image

Edit:
As for uvx python, I believe it's a duplicate of this issue (#7430).

@ksamuel
Copy link
Author

ksamuel commented Dec 23, 2024

Let's close it as a duplicate

@ksamuel ksamuel closed this as completed Dec 23, 2024
@zanieb zanieb added the duplicate This issue or pull request already exists label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants