hnswlib
hnswlib copied to clipboard
install
how to install
how to install
apt-get install -y python-setuptools python-pip pip3 install pybind11 numpy setuptools cd python_bindings python3 setup.py install
I did this and see logs below. However, when I import the import, it complains that module does not exist.
Installed /home/ec2-user/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages/hnswlib-0.2-py3.6-linux-x86_64.egg
Processing dependencies for hnswlib==0.2
Searching for numpy==1.14.5
Best match: numpy 1.14.5
Adding numpy 1.14.5 to easy-install.pth file
Using /home/ec2-user/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages
Searching for pybind11==2.2.4
Best match: pybind11 2.2.4
Adding pybind11 2.2.4 to easy-install.pth file
Using /home/ec2-user/anaconda3/envs/mxnet_p36/lib/python3.6/site-packages
Finished processing dependencies for hnswlib==0.2
import hnswlib
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-17-5b872521c582> in <module>()
----> 1 import hnswlib
ModuleNotFoundError: No module named 'hnswlib
Kindly help. Thanks
Found that the module was named with my Linux version on Mac likewise the __init__.py was also missing the module's root directory.
After changing the name and adding the __init__.py file, it now works.