-
Notifications
You must be signed in to change notification settings - Fork 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
Pip install editable poetry package fails on conflicting package version, although the exact same version is required #12520
Comments
This is (in effect) a duplicate of #12502 In this particular case, the dependency
is specified using Poetry-specific syntax, so it's not obvious how this translates into actual standard dependency metadata, but I would expect it to generate a direct URL pointing to |
is there any workaround to achieve this? I have the exact same problem. this is a real use case in a monorepo context. |
Yeah, this is pretty annoying for monorepos. For now we've just been adding an old version of poetry-plugin-export which doesn't have the issue:
|
So I understand the workflow a bit, if you're using poetry to manage your environments, why are you using pip to install and not poetry? It looks like poetry has set up a scenario that pip can't support because it doesn't know poetry specific information about the dependencies. In which case, there may be a workaround, but it's going to be related to how you set up the projects in poetry. |
In our specific situation, we use pip to install dependencies in places that are either annoying to use poetry (buildpacks) or simply require pip/requirements.txt full stop (Google Cloud Functions). When poetry exported other packages in the monorepo using a file path, pip was able to resolve the dependencies, but if it exports editable dependencies then pip is unable to resolve them. |
That sounds like it's something that poetry should address in their export mechanism, then. As noted in #12502, pip doesn't support installing a local path twice, once in editable mode and once in non-editable mode. Poetry needs to take that into account somehow. |
Description
Pip version resolver fails when installing Poetry package in editable mode if package is required both by TOML file & requirements.txt file:
Expected behavior
No response
pip version
Pip 24.0
Python version
Python: 3.10.0
OS
MacOS
How to Reproduce
Create folder structure
with requirements.txt content
first_library pyproject.toml dependencies
run
pip install -r requirements.txt
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: