Closed adam-greer closed 6 years ago
Are you sure that python3 is the default one? I mean, you're using python setup.py
for building and installing yara, but then you use python3
for running your program. In many version of Debian when you run python
is actually python 2.x
what you are running. So, you may installing yara for python python 2.x
and trying to use it from python 3.x
Trying to install yara-python on deb. No install issues using python setup.py python setup.py build sudo python setup.py install
However when I run my .py to import yara I get: python3 1129.py
Traceback (most recent call last): File "/home/scripts/script1/1129.py", line 3, in
import yara
ImportError: No module named 'yara'
Please wait a moment while I gather a list of all available modules...
Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused /usr/lib/python3/dist-packages/UpdateManager/Dialogs.py:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded. from gi.repository import Gtk /usr/lib/python3/dist-packages/pyatspi/init.py:17: PyGIWarning: Atspi was imported without specifying a version first. Use gi.require_version('Atspi', '2.0') before import to ensure that the right version gets loaded. from gi.repository import Atspi /usr/lib/python3/dist-packages/usbcreator/backends/udisks/backend.py:4: PyGIWarning: UDisks was imported without specifying a version first. Use gi.require_version('UDisks', '2.0') before import to ensure that the right version gets loaded. from gi.repository import Gio, GLib, UDisks /usr/lib/python3/dist-packages/usbcreator/frontends/gtk/unitysupport.py:27: PyGIWarning: Unity was imported without specifying a version first. Use gi.require_version('Unity', '7.0') before import to ensure that the right version gets loaded. from gi.repository import Unity AptUrl apport_python_hook hmac resource CDROM apt hpmudext rlcompleter CommandNotFound apt_inst html runpy DLFCN apt_pkg html5lib scanext DistUpgrade aptdaemon http sched IN aptsources httplib2 select LanguageSelector argparse idlelib selectors NvidiaDetector array idna sessioninstaller Onboard ast imaplib setup PIL asynchat imghdr setuptools Quirks asyncio imp shelve TYPES asyncore importlib shlex UbuntuDrivers atexit inspect shutil UbuntuSystemService audioop io signal UpdateManager base64 ipaddress site future bdb itertools sitecustomize _ast binascii janitor six _bisect binhex jinja2 smtpd _bootlocale bisect json smtplib _bz2 blinker jwt sndhdr _cffi_backend brlapi keyword socket _codecs bs4 language_support_pkgs socketserver _codecs_cn builtins lib2to3 softwareproperties _codecs_hk bz2 linecache speechd _codecs_iso2022 cProfile locale speechd_config _codecs_jp cairo logging spwd _codecs_kr calendar louis sqlite3 _codecs_tw cgi lsb_release sre_compile _collections cgitb lxml sre_constants _collections_abc chardet lzma sre_parse _compat_pickle checkbox_support macpath ssh_import_id _compression chunk macurl2path ssl _crypt cmath mailbox stat _csv cmd mailcap statistics _ctypes code mako string _ctypes_test codecs markupsafe stringprep _curses codeop marshal struct _curses_panel collections math subprocess _datetime colorsys mimetypes sunau _dbm compileall mmap symbol _dbus_bindings concurrent modulefinder symtable _dbus_glib_bindings configparser multiprocessing sys _decimal contextlib netrc sysconfig _dummy_thread copy nis syslog _elementtree copyreg nntplib systemd _functools crypt ntpath tabnanny _gdbm cryptography nturl2path tarfile _hashlib csv numbers telnetlib _heapq ctypes oauthlib tempfile _imp cups opcode termios _io cupsext operator test _json cupshelpers optparse tests _locale curl orca textwrap _lsprof curses os this _lzma datetime ossaudiodev threading _markupbase dbm padme time _md5 dbus parser timeit _multibytecodec deb822 pathlib tkinter _multiprocessing debconf pcardext token _opcode debian pdb tokenize _operator debian_bundle pexpect trace _osx_support decimal pickle traceback _pickle defer pickletools tracemalloc _posixsubprocess difflib pipes tty _pydecimal dis pkg_resources turtle _pyio distutils pkgutil types _random doctest plainbox typing _sha1 dummy_threading platform ufw _sha256 easy_install plistlib unicodedata _sha512 email poplib unittest _signal encodings posix uno _sitebuiltins enum posixpath unohelper _socket errno pprint urllib _sqlite3 faulthandler problem_report urllib3 _sre fcntl profile usbcreator _ssl feedparser pstats uu _stat feedparser_sgmllib3 pty uuid _string filecmp ptyprocess venv _strptime fileinput pwd warnings _struct fnmatch py_compile wave _symtable formatter pyasn1 weakref _sysconfigdata fpectl pyatspi webbrowser _sysconfigdata_m fractions pyclbr wsgiref _testbuffer ftplib pycurl xdg _testcapi functools pydoc xdiagnose _testimportmultiple gc pydoc_data xdrlib _testmultiphase genericpath pyexpat xkit _thread getopt pygtkcompat xlsxwriter _threading_local getpass pyparsing xml _tracemalloc gettext queue xmlrpc _warnings gi quopri xxlimited _weakref glob random xxsubtype _weakrefset grp re zipapp abc guacamole readline zipfile aifc gzip reportlab zipimport antigravity hashlib reprlib zlib apport heapq requests
Enter any module name to get more help. Or, type "modules spam" to search for modules whose name or summary contain the string "spam".