-
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
Install wheel based on platform #1616
Comments
IssueFirst of all thank you for your hard work. Poetry has made the otherwise painful Python dependency management much easier to deal with. It seems like I have the same issue as @chohner. Following the latest documentation regarding multiple constraint dependencies and using environment markers to define different requirements as stated
does not seem to work. Here is the excerpt from my pyproject.toml
Regardless of the platform, always the top package gets selected. Executing a poetry update using the pyproject.toml above on Linux causes an exception because the Windows wheel gets selected:
This leads to a couple of questions:
For example
If Windows fetch the package from internal devpi, if Linux use the file. Any advice or further insight would be highly appreciated. |
Is there any solution to this? If not I cannot use poetry... |
The issues seem to be resolved for me with 1.1.0rc1 - |
thanks for checking, seems to be working for me too! closing this issue |
Not working when using Does anyone have an example of a successful work-around? This is the simple entry I have in my
NOTE: This has equivalent behavior for In my
Regardless if I'm on OS X or Linux, From this thread history, it appears as if there was a fix? If so, where can I get it? |
I am on poetry
Installs fine on my mac (which used to fail trying to install the linux wheel) and linux CI. |
I'm also having difficulty with this:
[tool.poetry.dependencies]
# ...
# https://www.lfd.uci.edu/~gohlke/pythonlibs/
# https://stackoverflow.com/questions/54998028/how-do-i-install-pyaudio-on-python-3-7/54999645
pyaudio = [
{path = "blobs/PyAudio-0.2.11-cp38-cp38-win_amd64.whl", platform = "windows" },
{version = "0.2.11", platform = "linux" }
] |
The same thing happened to me, and I am using poetry 1.1.4. I have a path dependency that will include different extras in different platform. Different extras only work in their specific platform. I have a marker saying "sys_platform == 'win32'" and a second one saying "sys_platform == 'darwin'". It turns out the first one is chosen on MacOS and poetry tries to install the extra for win32, which failed. If I switch the order of the two constraints, poetry successfully install the constrained package on MacOS. Could maintainer please reopen this issue? @abn |
This problem was solved for me after updating to poetry 1.2.0b3. Behaviour is exactly what expected now. |
Resolved via #5715. |
This bug still exists in Poetry 1.5.1. My issues is that
Unfortunately, Poetry ignores the platform and tries to install 0.32.0 on Windows, which obviously fails. |
@RRiva Same thing happening to me with Jax |
Still a problem in poetry v1.7.1. Attempting to maintain 2 separate versions of
On MacOS, it appears fine via
But fails to install the correct version on
This post is pretty much my exact problem. But as of now, I can't use the workaround proposed, as I need @radoering What is the preferred process here? Should I open a new issue, or keep everything within this issue? |
In general it's probably better to open a new issue and link the related resolved issue if you think that a resolved issue is not resolved. (Most of the times the resolved issue is resolved and you are just experiencing a similar but different issue.) In this specific case, a new issue is not required. You either want something like #7256 or (assuming that you expect that a wheel from PyPI is chosen for MacOS) you should force the source in the first constraint:
|
Thanks for the clarification - I'll note that for future issues. Re: the proposed solution above, this now installs the correct Actual
Expected
Relevant
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: OSX 10.14.6
Poetry version: Poetry 0.12.17
Link of a Gist with the contents of your pyproject.toml file: not helpful as local files would be necessary
Issue
Based on this documentation, the following should be possible:
Each dependency is correctly handled on its own (aka ignored/installed), but pip seems to always try to install the first dependency if ANY dependency inside the array matches. So the above construct works on linux but not on osx, exchanging the line order swaps the behavior.
I understand this might be annoying to reproduce since it requires two local wheels for different platforms.
The text was updated successfully, but these errors were encountered: