When generating my python lockfile I'm receiving t...
# general
When generating my python lockfile I'm receiving the following error:
Copy code
import numpy as np
  ModuleNotFoundError: No module named 'numpy'
  ERROR: Failed building wheel for nmslib
ERROR: Failed to build one or more wheels
Confirmed the deps exist in the requirements file and what not. Tips for debugging?
It's all right there in the message - nmslib is broken. See here: https://github.com/nmslib/nmslib/blob/ade4bcdc9dd3719990de2503871450b8a62df4a5/python_bindings/setup.py#L165 Now that
to try and get
pre-installed, but the
is known broken and even part of the motivation for PEP-518. The easiest thing to do is probably fork the repo and add a
with this contents at `python_bindings/pyproject.toml`:
Copy code
requires = ["setuptools", numpy>=1.10.0 ; python_version>='3.5']
build-backend = "setuptools.build_meta"
You then depend on
via a VCS requirement instead of your current requirement string (whatever that is) :`git+https://github.com/<your fork>/nmslib@<sha or tag or branch>#egg=nmslib&subdirectory=python_bindings`. My advice above was lazy and I read all this from the tip of the master branch of the nmslib repo, you almost certainly need to adjust details to pick out the branch / tag / sha you actually want to target.
Yikes. Ok, thanks for the info, John. Appreciate the tips.
You're welcome.
FWIW the Python world is full of this. Basically Python has gotten by on good will and luck but the packaging mess is coming home to roost with the AI / ML / data science revolution whether or not Python + PyPA want to face up to it. The situation needs even more love than its being given.