Operating system: Microsoft Windows wxPython version & source: 4.0.7 (from PyPI) Python version & source: 2.7.14
Description of the problem:
Version 4.0.7 regressed the numpy version dependency to v1.16.1 whereas version 4.0.6 specified this dependency as v1.16.5. Now, when pulling the latest wxPython into our CI/CD environment it causes conflicts with previous environments that used 4.0.6. Is this a requirement or can the required version of numpy be restored to v1.16.5?
The text was updated successfully, but these errors were encountered:
Previously the dependency was specified without a version number so the newest version would be chosen, but that caused problems because the 17.x version of numpy does not support Python 2.7. At the time it was thought, or misunderstood, that 1.16.1 would be the last release for Python 2.7 so that is why that version was specified in the new constraint.
Until we can refine that constraint and release a fix I suggest either using --no-deps when installing wxPython, or update numpy to 1.16.5 after installing wxPython and ignore the warnings.
On Python 2.7, without specifying numpy version number, pip will select latest available version, for Python 2.7 which will be numpy==1.16.5 as of today. So if not specifying numpy version then dependency for Python 2.7 will be resolved.
Thanks Robin for trying to improve the situation with the fix. I am not quite sure it is going to help avoid what appears to be a pip (version 19.3.1) anomaly. Before this fix, what I see is that if package X has a setup.py file that has an install_requires listing both numpy and wxPython independently, then installing X produces a pip error:
ERROR: wxpython 4.0.7 has requirement numpy==1.16.1; python_version <= "2.7", but you'll have numpy 1.16.5 which is incompatible.
If package X had only wxPython as a dependency, it installed itself just fine using wxPython==4.0.7 and numpy==1.16.1. I see this as pip having an anomaly in its package dependency resolution logic. I'm crossing my fingers that the fix of specifying a upper limit avoids the anomaly in pip.