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

error: No interpreter found -- #9088

Open
EdmundsEcho opened this issue Nov 13, 2024 · 2 comments
Open

error: No interpreter found -- #9088

EdmundsEcho opened this issue Nov 13, 2024 · 2 comments
Labels
error messages Messaging when something goes wrong

Comments

@EdmundsEcho
Copy link

I am new to uv.

The problem

When I tried to initialize a new project, I received the following:

❯ uv init TestProject --verbose
DEBUG uv 0.5.1 (f399a5271 2024-11-08)
DEBUG Reading Python requests from version file at `/Users/edmund/Downloads/.python-version`
DEBUG Searching for Python interpreter with executable name `3.10-dev`
DEBUG Checking for Python interpreter at executable name `3.10-dev`
error: No interpreter found for executable name `3.10-dev` in virtual environments, managed installations, or search path

The fix

Removed the .python-version present in the root folder from where I was trying to create the new project.

Longer term fix

I'm not sure if there is a better way to report the error, or dare I say use the version of python that I installed using uv. I don't know enough to have a POV.

@Kanerix
Copy link

Kanerix commented Nov 13, 2024

I think your issue is that uv is reading the python version from a .python-version file in your downloads folder.

That version is not valid (use uv python list --all-versions to see valid versions if im not mistaken).

This line shows your issue:

DEBUG Reading Python requests from version file at `/Users/edmund/Downloads/.python-version`

@charliermarsh charliermarsh added the error messages Messaging when something goes wrong label Nov 13, 2024
@charliermarsh
Copy link
Member

Thanks for filing. @Kanerix is right that we're reading 3.10-dev from your .python-version file. Then, because it's not a valid version, we assume it's the name of an executable, and we can't find an executable named 3.10-dev. Agree it would be nice if the error message included more context here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong
Projects
None yet
Development

No branches or pull requests

3 participants