Python Issue - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Python Issue (/thread-12508.html) |
Python Issue - radharani1306 - Aug-28-2018 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 RE: Python Issue - Axel_Erfurt - Aug-28-2018 python2 which python python3 which python3
RE: Python Issue - radharani1306 - Aug-28-2018 Mr. Axel_Erfurt I have already mentioned these. please find my post RE: Python Issue - Gribouillis - Aug-28-2018 (Aug-28-2018, 01:29 PM)radharani1306 Wrote: after this command python dummy.pyUse python3 dummy.py
RE: Python Issue - Karenm - Aug-29-2018 (Aug-28-2018, 01:29 PM)radharani1306 Wrote: 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 Hi Radha, I have vast experience in Python and Linux and I feel we can assist you on this mandate. Would be glad to discuss and take this forward. Look forward to hearing from you. Gmail: karen.cis10gmail.com Skype: cisin.karen Regards, Karen RE: Python Issue - buran - Aug-29-2018 @KarenM: This is forum, not freelance or job site. Yet we have also dedicated Jobs section. If you can and want to help - do it here, so others could benefit too in the future. Don't offer paid services, except in Job section of the forum. |