lanscan
lanscan copied to clipboard
lanscan install failed on python 3.4.2
I get an error when running pip install lanscan
on python 3.4.2:
Searching for lanscan Reading https://pypi.python.org/simple/lanscan/ Best match: lanscan 0.9.5 Downloading https://pypi.python.org/packages/b7/a2/e1c3982369150defa561f5bb7 6eda1a30dd5a8ac8edf4c4c296fda51/lanscan-0.9.5.tar.gz#md5=ad8187c1f05bddc9314 d275d3242 Processing lanscan-0.9.5.tar.gz Writing C:\Users\Vagif\AppData\Local\Temp\easy_install-214bu4c9\lanscan-0.9. tup.cfg Running lanscan-0.9.5\setup.py -q bdist_egg --dist-dir C:\Users\Vagif\AppDat cal\Temp\easy_install-214bu4c9\lanscan-0.9.5\egg-dist-tmp-ufekaoaw package init file 'lanscan_init_.py' not found (or not a regular file) warning: no previously-included files matching '.html' found under directory
warning: no previously-included files matching '.json' found under directory
warning: no previously-included files matching '.gitignore' found under dire y '' warning: no previously-included files matching '.travis.yml' found under dir ry '' warning: no previously-included files matching '*.pyc' found under directory
Traceback (most recent call last):
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 154, in s
modules
yield saved
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 195, in s
_context
yield
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 243, in r
etup
DirectorySandbox(setup_dir).run(runner)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 273, in r
return func()
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 242, in r
r
_execfile(setup_script, ns)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 46, in _e
ile
exec(code, globals, locals)
File "C:\Users\Vagif\AppData\Local\Temp\easy_install-214bu4c9\lanscan-0.9.
tup.py", line 74, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\python34\lib\runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "c:\python34\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python34\Scripts\easy_install.exe_main.py", line 9, in <modul
File "c:\python34\lib\site-packages\setuptools\command\easy_install.py", l
2241, in main
distclass=DistributionWithoutHelpCommands, **kw
File "c:\python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python34\lib\site-packages\setuptools\command\easy_install.py", l
391, in run
self.easy_install(spec, not self.no_deps)
File "c:\python34\lib\site-packages\setuptools\command\easy_install.py", l
640, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\python34\lib\site-packages\setuptools\command\easy_install.py", l
670, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\python34\lib\site-packages\setuptools\command\easy_install.py", l
850, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\python34\lib\site-packages\setuptools\command\easy_install.py", l
1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\python34\lib\site-packages\setuptools\command\easy_install.py", l
1064, in run_setup
run_setup(setup_script, args)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 246, in r
etup
raise
File "c:\python34\lib\contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 195, in s
_context
yield
File "c:\python34\lib\contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 166, in s
modules
saved_exc.resume()
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 141, in r
e
six.reraise(type, exc, self._tb)
File "c:\python34\lib\site-packages\pkg_resources_vendor\six.py", line 68
n reraise
raise value.with_traceback(tb)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 154, in s
modules
yield saved
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 195, in s
_context
yield
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 243, in r
etup
DirectorySandbox(setup_dir).run(runner)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 273, in r
return func()
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 242, in r
r
_execfile(setup_script, ns)
File "c:\python34\lib\site-packages\setuptools\sandbox.py", line 46, in _e
ile
exec(code, globals, locals)
File "C:\Users\Vagif\AppData\Local\Temp\easy_install-214bu4c9\lanscan-0.9.
tup.py", line 74, in
Have you tried it with a current Python (at least 3.5) and setuptools/pip version? I just tried it on my Fedora 25 without problems. I have never tried it on windows and I don't know if it will work, as I use tcpdump to decode some packages. I don't have a windows machine nearby, but if it doesn't work with python and setuptools/pip updated, I will try to get one...
I installed it on python 3.6.1 and it worked but it crashed as I didn't have Microsoft Visual C++ 2015. After I installed Visual C++ 2015, I installed tcpdump
for windows and put it in my python directory, but when I type lanscan
into cmd from my python directory, it gives me a scapy
error: from scapy.sendrecv import debug, srp1 ImportError: cannot import name 'debug'
I think this error occurs because there is a bug in the .get()
method of whatever self.package_data
is, because it returns a string when it should return a list of string. To fix this error, I changed line 98 of the setuptools/command/build_py.py
file to the following:
+ [self.package_data.get(package, [])])
Then, after this fix, I had to run sudo pip install lanscan
because I am on Ubuntu and needed root privileges to install the program into /usr/local/bin
. After running that command, lanscan was installed correctly and I was able to run the lanscan program from bash.