python pip logging install error in setup script and tabulate not found.....
n1ete opened this issue · comments
i got a problem with the specific pip install logging
command in the setup script... if i run pip install logging manually it throws me the following same error
Collecting logging (from -r requirements.txt (line 2)) Using cached https://files.pythonhosted.org/packages/93/4b/979db9e44be09f71e85c9c8cfc42f258adfb7d93ce01deed2788b2948919/logging-0.4.9.6.tar.gz Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/logging.egg-info writing pip-egg-info/logging.egg-info/PKG-INFO writing dependency_links to pip-egg-info/logging.egg-info/dependency_links.txt writing top-level names to pip-egg-info/logging.egg-info/top_level.txt writing manifest file 'pip-egg-info/logging.egg-info/SOURCES.txt' Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-d1761e8t/logging/setup.py", line 13, in <module> packages = ["logging"], File "/usr/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/egg_info.py", line 278, in run self.find_sources() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/egg_info.py", line 293, in find_sources mm.run() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/egg_info.py", line 524, in run self.add_defaults() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/egg_info.py", line 560, in add_defaults sdist.add_defaults(self) File "/usr/local/lib/python3.6/dist-packages/setuptools/command/py36compat.py", line 34, in add_defaults self._add_defaults_python() File "/usr/local/lib/python3.6/dist-packages/setuptools/command/sdist.py", line 127, in _add_defaults_python build_py = self.get_finalized_command('build_py') File "/usr/lib/python3.6/distutils/cmd.py", line 298, in get_finalized_command cmd_obj = self.distribution.get_command_obj(command, create) File "/usr/lib/python3.6/distutils/dist.py", line 846, in get_command_obj klass = self.get_command_class(command) File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 635, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2321, in load return self.resolve() File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2327, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/local/lib/python3.6/dist-packages/setuptools/command/build_py.py", line 15, in <module> from setuptools.lib2to3_ex import Mixin2to3 File "/usr/local/lib/python3.6/dist-packages/setuptools/lib2to3_ex.py", line 12, in <module> from lib2to3.refactor import RefactoringTool, get_fixers_from_package File "/usr/lib/python3.6/lib2to3/refactor.py", line 17, in <module> import logging File "/tmp/pip-build-d1761e8t/logging/logging/__init__.py", line 618 raise NotImplementedError, 'emit must be implemented '\ ^ SyntaxError: invalid syntax
python -V
shows Python 2.7.15
so why is the script looking at the 3.6 env?
didnt expected airsniff to run before fixing this error but tried anyways and get also an
python ./SniffAir.py Traceback (most recent call last): File "./SniffAir.py", line 5, in <module> from Sniffer import * File "lib/Sniffer.py", line 3, in <module> from SniffAir import * File "/root/SniffAir/SniffAir.py", line 6, in <module> from Connect2DB import * File "lib/Connect2DB.py", line 8, in <module> from tabulate import tabulate ImportError: No module named tabulate
pip gives me an already statisfied if i installed it manually
SniffAir was developed with Python version 2.7. I just installed it on a fresh Kali image with no issues. It looks like the problem could be with your pip. What OS are you running?
i am on a Kali VM too
like i wrote: somehow the script looks at the python 3 env instead of the v2.7 version... and i look for a way to avoid that?!
Unfortunately I don't think this is an issue with SniffAir, each time I've tested it, it uses the proper pip. This might be an issue with your Kali's pip alias.
changed command in setup script from "pip install" to "pip2 install" to force the use of python 2.7.