VirusTotal / yara-python

The Python interface for YARA
http://virustotal.github.io/yara/
Apache License 2.0
648 stars 179 forks source link

A strange error was encountered after pip install yara-python #263

Open Make-Ye opened 3 weeks ago

Make-Ye commented 3 weeks ago

Failed to import 'C:\Users\Name\AppData\Local\Programs\Python\Python311\DLLs\libyara.dll' Traceback (most recent call last): File "C:\Users\Name\AppData\Local\Programs\Python\Python311\Lib\site-packages\yara__init.py", line 7, in from yara.rules import compile File "C:\Users\Name\AppData\Local\Programs\Python\Python311\Lib\site-packages\yara\rules.py", line 17, in from yara.libyara_wrapper import * File "C:\Users\Name\AppData\Local\Programs\Python\Python311\Lib\site-packages\yara\libyara_wrapper.py", line 315, in libyaradll = cdll.LoadLibrary(library) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Name\AppData\Local\Programs\Python\Python311\Lib\ctypes__init__.py", line 454, in LoadLibrary return self._dlltype(name) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Name\AppData\Local\Programs\Python\Python311\Lib\ctypes\init.py", line 376, in init__ self._handle = _dlopen(self._name, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: Could not find module 'C:\Users\Name\AppData\Local\Programs\Python\Python311\DLLs\libyara.dll' (or one of its dependencies). Try using the full path with constructor syntax.

when I looked for the file, it turned out to be in this directory for me: C:\Users\Name\AppData\Local\Programs\Python\Python311\Lib\site-packages\Users\Name\AppData\Local\Programs\Python\Python310\DLLs

wxsBSD commented 3 weeks ago

I think you installed the wrong one. You want to use yara-python.