-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry init Unable to Find Package During Interactive Dependency Addition #9884
Comments
I have verified the connectivity to The response confirms that the endpoint is accessible, as shown below:
This may indicate that the issue is not related to network connectivity or access to the PyPI repository. Instead, it seems specific to how poetry init handles package search queries. |
indeed the search returns no results
perhaps something has changed or broken at https://github.com/pypi/warehouse, I expect you'll want to ask over there |
PyPI removed info about the latest version from their search results, breaking our search logic. |
I'm surprised this was ever supported. Pip has been unable to search for years at this point
Probably the best solution is to just use the index directly e.g. https://pypi.org/simple/pytest/. I doesn't let the user do any kind of fuzzy matching, but it at least lets us interactively define dependencies when we're sure we know the package name exactly. |
I'm guessing the culprit is this? |
I am new to using poetry and I was very confused why it wasn't working... now I know why |
Description
When using the
poetry init
command to create a new project, the interactive dependency addition step fails to find packages (e.g.,numpy
). However, the poetry add command works as expected for the same package. The issue appears to be related to howpoetry init
handles package search and HTTP requests.Workarounds
After completing the poetry init process, dependencies can be added using the poetry add command. For example:
poetry add numpy
. This bypasses the issue with the interactive dependency search step.Poetry Installation Method
install.python-poetry.org
Operating System
Windows 11 24H2
Poetry Version
1.8.4
Poetry Configuration
Python Sysconfig
Example pyproject.toml
Poetry Runtime Logs
The text was updated successfully, but these errors were encountered: