-
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
Cannot install numpy and opencv-python with specified versions that should work together due to wrongly detected numpy requirement #6447
Comments
I think, pip is taking into account the local system and architecture, where as poetry is trying to create a universal installation solution, so the darwin/arm64 lines are being taken into account. I do not think there's any work around for that at the moment, could be wrong though. |
Poetry's documentation shows that there is a possibility to specify install conditions for dependencies based on environment markers. |
Yes - suggest that you try that! ie add an explicit dependency for the numpy that you want, in the environment that you want it |
@dimbleby but it is the problem with reading
In
|
poetry is trying to produce a solution that will work on all platforms, for all versions of python supported by your pyproject.toml. If you unconditionally require numpy=1.19.5 then there is no such solution, because on some platforms this conflicts with the requirements of opencv-python The same is true in your most recent try, that requirement is in conflict with this opencv-python requirement
You will have to construct a requirement that specifies the platform that you are on, and that does not cause conflicts with opencv-python requirements |
I set requirements with exact platform info, but unfortunately it didn't help:
Poetry still enforce |
this looks like it should work, failure is probably duplicate #5506 |
actually no, I take it back, you're still conflicting this opencv-python requirement
|
fixed the problem. Thank You for your suggestions! |
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. |
-vvv
option).Issue
In my project I need to install
opencv-python==4.5.5.62
andnumpy==1.19.5
with these specified versions. This problem is similar to #4451 but this time JSON metadata about opencv-python requirements have proper values:Which is properly read when installing with
pip
(seeCollecting numpy>=1.19.3
):pip3 install opencv-python==4.5.5.62 Collecting opencv-python==4.5.5.62 Using cached opencv_python-4.5.5.62-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.4 MB) Collecting numpy>=1.19.3 Downloading numpy-1.23.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 43.2 MB/s eta 0:00:00 Installing collected packages: numpy, opencv-python Successfully installed numpy-1.23.2 opencv-python-4.5.5.62
opencv-python==4.5.5.62
andnumpy==1.19.5
can be installed together withpip
, however it can't be installed withpoetry
.After adding
opencv-python==4.5.5.62
to project,numpy==1.19.5
can't be added because poetry reads wrongly numpy version requirement as>=1.21.2
The text was updated successfully, but these errors were encountered: