Aug-28-2018, 01:29 PM
I am new to python and Kali linux. I have installed Kali linux on virtual box to practice Python. But I am unable to execute python programs which imports pandas,scapy etc.
I observed the following things in my Kali environment
1) when executed "which Python", it lists (same for Python3)
/usr/bin
2) when executed "which pip", it lists (same for pip3)
/usr/local/bin
/usr/bin
3) When tried to install scapy/ pandas using "apt-get install pandas/scapy", it is giving the following
pip3 install scapy
Requirement already satisfied: scapy in /root/.local/lib/python3.6/site-packages (2.4.0)
4) But when I execute python file which has "import scapy" statement is not executing. I am getting the following error
after this command python dummy.py
Traceback (most recent call last):
File "dummy.py", line 1, in <module>
import scapy.all as scapyall
File "/usr/local/lib/python2.7/dist-packages/scapy/all.py", line 10, in <module>
from .config import *
File "/usr/local/lib/python2.7/dist-packages/scapy/config.py", line 11, in <module>
from .data import *
File "/usr/local/lib/python2.7/dist-packages/scapy/data.py", line 184, in <module>
TCP_SERVICES,UDP_SERVICES=load_services("/etc/services")
File "/usr/local/lib/python2.7/dist-packages/scapy/data.py", line 109, in load_services
f=open(filename, errors='ignore')
TypeError: 'errors' is an invalid keyword argument for this function
Please help me, I am struggling with this from 5 days.
thanks,
Radha
I observed the following things in my Kali environment
1) when executed "which Python", it lists (same for Python3)
/usr/bin
2) when executed "which pip", it lists (same for pip3)
/usr/local/bin
/usr/bin
3) When tried to install scapy/ pandas using "apt-get install pandas/scapy", it is giving the following
pip3 install scapy
Requirement already satisfied: scapy in /root/.local/lib/python3.6/site-packages (2.4.0)
4) But when I execute python file which has "import scapy" statement is not executing. I am getting the following error
after this command python dummy.py
Traceback (most recent call last):
File "dummy.py", line 1, in <module>
import scapy.all as scapyall
File "/usr/local/lib/python2.7/dist-packages/scapy/all.py", line 10, in <module>
from .config import *
File "/usr/local/lib/python2.7/dist-packages/scapy/config.py", line 11, in <module>
from .data import *
File "/usr/local/lib/python2.7/dist-packages/scapy/data.py", line 184, in <module>
TCP_SERVICES,UDP_SERVICES=load_services("/etc/services")
File "/usr/local/lib/python2.7/dist-packages/scapy/data.py", line 109, in load_services
f=open(filename, errors='ignore')
TypeError: 'errors' is an invalid keyword argument for this function
Please help me, I am struggling with this from 5 days.
thanks,
Radha