0

I'm running into the error discussed here when running setup.py: numpy 1.19.4 fails to install due to a windows bug. The current workaround is to use numpy 1.19.3 instead. However, I'm trying to run a setup.py file that doesn't list numpy directly as a dependency, but uses several packages that has numpy as a sub-dependency.

Because of this, I cannot directly pin numpy to 1.19.3. In this scenario, is there a simple way to get the install script working? In other words: how can I modify the setup.py file so that it won't install any package (versions) that has numpy 1.19.4 as a dependency?

Joakim
  • 2,092
  • 1
  • 20
  • 23

1 Answers1

1

The available dependency relations include !=

numpy!=1.19.4
tripleee
  • 175,061
  • 34
  • 275
  • 318
  • thanks, that looks to be what I need. Where can I add this requirement to make sure it is respected when running `setup.py`? I tried adding it to `setup_requires` and `install_requires` with no luck – Joakim Dec 28 '20 at 13:10
  • `install_requires=['numpy!=1.19.4']` works for me, and currently gets me 1.20.0rc2 on MacOS with Python 3.7.2. – tripleee Dec 28 '20 at 13:17
  • Unfortunately this doesn't work for me when numpy is a sub-dependency. pip still seems to install numpy 1.19.4 when other packages depend on numpy – Joakim Dec 28 '20 at 13:37
  • turns out this wasn't the root cause of my issues, so no answer to this question could have worked. Nevertheless, thanks again for your help. – Joakim Dec 28 '20 at 14:11