python3 for ubuntu can't find scapy?
Question: I'm trying to run a python script using scapy in Ubuntu 14.04. I downloaded
python3 with

    
    
    sudo apt-get install python3
    

and I'm running the file I have with

    
    
    sudo python3 <my filename>.py
    

As for importing scapy into my python file, I've tried

    
    
    from scapy.all import *
    

and

    
    
    import scapy.all
    

and other variations I've found while browsing the internet. However, none of
them work and I keep getting the "No module named 'scapy'" error.

My script worked when I ran it in python2 in the same environment using scapy,
but I've made changes specific to python3 in another development environment
and now need to run it in python3 in this environment.

Any ideas on how to get this working? I've tried updating python also, but I
can't get it to upgrade versions.


Answer: You have to install scapy library before using it. By what you write it seems
you just installed python3 and not scapy. Either:

  * install pip3 and then `pip3 install scapy-python3` to install scapy library for all system
  * (recommended) or use virtualenv and install the same way inside virtual environment, and then run your script inside the python virtual environment

On usage of virutalenv for python you can easily find many guides. Please,
comment if you need assistance on that.

