knowhere icon indicating copy to clipboard operation
knowhere copied to clipboard

pip3 install pyknowhere.xx.whl, but "import pyknowhere" Error: ModuleNotFoundError: No module named 'pyknowhere'

Open zjx1230 opened this issue 1 year ago • 7 comments

Hello, Everyone! I want to use the package pyknowhere. I followed github's guide and successfully compiled the package, and after the installation was successful, it still prompted that the python package could not be found, what is going on? The installed package only has the directory pyknowhere-0.0.0.dist-info and no directory pyknowhere Here are the details:

(z00xxxxxxx) [root@node57 python]# pip3 install ./dist/pyknowhere-0.0.0-cp310-cp310-linux_x86_64.whl Looking in indexes: http://mirrors.tools.huawei.com/pypi/simple Processing ./dist/pyknowhere-0.0.0-cp310-cp310-linux_x86_64.whl Installing collected packages: pyknowhere Successfully installed pyknowhere-0.0.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

(z00xxxxxxx) [root@node57 python]# python Python 3.10.12 (main, Jul 5 2023, 18:54:27) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. import pyknowhere Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pyknowhere' exit()

(z00xxxxxxx) [root@node57 python]# ls /root/miniconda3/envs/z00878108/lib /python3.10/site-packages/ | grep knowhere* knowhere knowhere-1.0.0.dist-info pyknowhere-0.0.0.dist-info

OS: CentOS 7

zjx1230 avatar May 06 '24 12:05 zjx1230

It seems that you should use import knowhere image

SimFG avatar May 06 '24 12:05 SimFG

It seems that you should use import knowhere image

But, the project 'ann-benchmarks' has source code pyknowhere.Index(), import knowhere report error 'No Attribute'.

zjx1230 avatar May 06 '24 12:05 zjx1230

This seems to be due to version inconsistency. I see that 'ann-benchmarks' uses version 1.x, but now knowhere should be version 2.x image

SimFG avatar May 06 '24 13:05 SimFG

This seems to be due to version inconsistency. I see that 'ann-benchmarks' uses version 1.x, but now knowhere should be version 2.x image

However, when I checkout 1.x branch to generate the pyknowhere in the knowhere project, it still report error: Not Found module. Here is the details:

(z00xxxxx) [root@node57 knowhere]# git branch -v * 1.x c0aa5fb Fix DiskANN's Async cache making (#250)

(z00xxxxx) [root@node57 knowhere]# cd python/

(z00xxxxx) [root@node57 python]# pip3 install ./dist/knowhere-1.0.0-cp310-cp310-linux_x86_64.whl Looking in indexes: http://mirrors.tools.huawei.com/pypi/simple Processing ./dist/knowhere-1.0.0-cp310-cp310-linux_x86_64.whl Installing collected packages: knowhere Successfully installed knowhere-1.0.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

(z00xxxxx) [root@node57 python]# python Python 3.10.12 (main, Jul 5 2023, 18:54:27) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. import pyknowhere Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pyknowhere'

zjx1230 avatar May 06 '24 15:05 zjx1230

How to import pyknowhere? I can't use it.

zjx1230 avatar May 06 '24 16:05 zjx1230

I think this project 'ann-benchmarks' should use a historical version, but I am not sure. If you want to run it, I suggest you modify the relevant code in 'ann-benchmarks' according to the current knowhere code

SimFG avatar May 07 '24 02:05 SimFG

I think this project 'ann-benchmarks' should use a historical version, but I am not sure. If you want to run it, I suggest you modify the relevant code in 'ann-benchmarks' according to the current knowhere code

Sorry, I can't do it. The work so hard. I think there must be a version of the source code that can generate this corresponding package, otherwise the ann-benchmark project cannot run the algorithm. If anyone knows please let me know, thank you very much!

zjx1230 avatar May 11 '24 01:05 zjx1230

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

github-actions[bot] avatar Jun 10 '24 01:06 github-actions[bot]