trendmicro / tlsh

Other
726 stars 135 forks source link

Python "ImportError: No module named tlsh" #92

Closed prime-minister-of-fun closed 3 years ago

prime-minister-of-fun commented 3 years ago

First, yes. I followed the make instructions. I made the library first, then made the python library. Per the instructions, cd to Testing and execute ./python_test.sh Python version is 2.7

Running python tests for x86_64-2.7

testing generating hash and distance functions...

python ../py_ext/test.py ../Testing/example_data/2005NISSE.txt ../Testing/example_data/1english-only.txt > tmp/python_test.out Traceback (most recent call last): File "../py_ext/test.py", line 4, in import tlsh ImportError: No module named tlsh diff tmp/python_test.out exp/python_test_EXP error: diff tmp/python_test.out exp/python_test_EXP

ls /usr/local/lib/python3.8/dist-packages/ python_tlsh-3.17.0.dist-info tlsh-0.2.0.egg-info tlsh.cpython-38-x86_64-linux-gnu.so

ls /usr/local/lib/python2.7/dist-packages/ tlsh-0.2.0.egg-info tlsh.so

I'm on Debian Bullseye if that matters.

DBeath commented 3 years ago

I made a Pull Request that should hopefully fix some of these issues. https://github.com/trendmicro/tlsh/pull/75 I also turned it into a PyPi package (which I know for sure works): https://pypi.org/project/python-tlsh/

jonjoliver commented 3 years ago

I have set up the package py-tlsh on pypi.org You can see it at https://pypi.org/project/py-tlsh/ This works on Windows and has other improvements. You can install it by $ pip install py-tlsh

jonjoliver commented 3 years ago

I have retested python_test.sh With 4.5.0 and py-tlsh package it should work now...