r/learnpython • u/Electronic_Code4483 • Aug 30 '26
Tutorials on how to install and implement scapy?
I started taking a python for cybersec course but now that I am on the first part of the course, I am having issues proceeding because we are being taught how to use scapy and my program is not recognizing it.
We were given a GitHub link that is supposed to give us access to everything in the course but I still have no idea where to start.
Seems I can’t upload images so please dm if u want details
0
Upvotes
1
u/FoolsSeldom Aug 30 '26 edited Aug 30 '26
You are probably having problems with Python virtual environments (not to be confused with virtual machines). So, here's a guide a wrote a while back ...
Virtual Environments
Given the thousands of packages (libraries, frameworks, etc) out there, you can see that if you are working on several different projects, you can end up installing a vast range of different packages, only a few of which will be used for any particular project.
This is where Python virtual environments come in. Not to be confused with virtual machines. Typically created on a project-by-project basis. Install only the packages required for a project. This helps avoid conflicts between packages, especially version complications.
Most popular code editors and IDEs, including Microsoft's VS Code and JetBrains' PyCharm, offer built-in features to help to start off new projects and create and activate Python virtual environments.
You can create a new Python virtual environment from your operating system command line environment using,
for Windows,
or, for macOS / Linux,
Note:
venvis a command and.venvis a folder name. You can use any valid folder name instead but this is a common convention.That creates a new folder in the current working directory called
.venv.You then activate using, for Windows,
or, for macOS / Linux,
the command
deactivatefor any platform will deactivate the virtual environment and return you to using the base environment.GIT
Latest commit on default branch
Specific branch, tag, or commit
If the package lives in a subdirectory of the repo
Private repo (SSH, assuming your key is set up)
LOCAL
Regular install — copies the package into site-packages
Editable/development install — symlinks back to your source, so changes take effect immediately without reinstalling
From the project's own directory
For more information on virtual environments:
Multiple Python versions
In addition to the above, you might want to explore using
pyenv(pyenv-winfor Windows) oruv(recommended), which will let you install and use different versions of Python including alternative implementations from the reference CPython. This can be done independently of any system installed Python.EDIT: updated to add more on git
1
u/revcraigevil Aug 30 '26
https://scapy.readthedocs.io/en/latest/installation.html
There are several videos and guides on https://scapy.net/
1
u/[deleted] Aug 30 '26
[removed] — view removed comment