I need numpy== 1.18.0 or under 1.20.0, however, I get error as below:
Collecting numpy==1.18
Using cached numpy-1.18.0.zip (5.4 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
what I tried are:
- first I checked the numpy version as below:
import numpy as np
print(np.__version__)
this showed numpy 1.25
- Then, I uninstalled the current version as bellow:
pip uninstall numpy
it said the numpy was successfully uninstalled.
- Then, I installed the desired version
pip install numpy==1.18and got the error that I mentioned. I again checked the numpy version and it still shows 1.25, although it showed the numpy has been successfully uninstalled! Also, I tried this process for other under 1.20 numpy versions and the outcome was the same as above!