[Environment Config]How to fix “ImportError: No module named scapy.all”

If you are using CentOS or RHEL, it is strongly recommended that you configure EPEL (Extra Packages for Enterprise Linux) repository on your system. EPEL is a community effort to create a repository of high-quality add-on free software packages for RHEL-based distributions. Once you set up EPEL repository, you can use yum command to install any of close to 7,000 EPEL packages.

In order to enable EPEL repository on your CentOS system, you need to check CentOS version. To do that, run the following command.

$ cat /etc/redhat-release
CentOS release 6.3 (Final)

Then install a corresponding EPEL release RPM package as follows. Note that the EPEL release RPM does not depend on the underlying processor architecture (e.g., 32-bit/64-bit x86, ppc, sparc, alpha, etc), so no need to pay attention to processor architecture difference.

Set up EPEL and scapy on CentOS 7

Starting from CentOS 7, EPEL release RPM package is available in "extras" repo. Therefore, simply use yum command to set up EPEL repository on these platforms:

$ sudo yum install epel-release
$sudo yum install scapy

你可能感兴趣的:(Environment,Config)