00. MacOS Setup
Since the provided instructions only detail how to prepare the workspace for Windows, I did some research and tinkering to find out what needs to get set up for MacOS. I chose not to use PyCharm, opting for VSCode instead, but it shouldn’t really make a difference, it’s just a text editor.
Install Python 3.8¶
PyEnv – Python Version Manager¶
The instructions specify to install Python 3.8.0. I, for no particular reason, went with the latest 3.8 release (3.8.19). It shouldn’t make a difference.
Using brew, install pyenv
with the Terminal:
Bash | |
---|---|
Once that runs, go to the instructions at this section of the PyEnv GitHub repository, and find the steps specific to your shell environment. You can find your shell by running echo $SHELL
.
I’m using zsh
, so I ran the following commands:
Bash | |
---|---|
Once your shell environment is configured properly, run exec "$SHELL"
to apply the changes you made.
Next, choose where you want your working directory. I’ll be using ~/Documents/Machon Lev/Year II/Semester II/AdComms
as my working directory.
Navigate to the folder you chose with the terminal.
Bash | |
---|---|
Python Installation¶
If you want to use the latest patch release of Python 3.8, remove the trailing .0
from the python version where appropriate.
To install the first release of Python 3.8, run the command as is:
Bash | |
---|---|
Once you’re in your working directory, run:
Bash | |
---|---|
PyEnv Local Installation
The local
specifier means that your selected version of python will automatically be selected when you are within the designated folder (in the terminal), and it’ll switch back to the default version when you navigate back out of that folder.
The following commands all assume that they’re run from within your workspace folder, with Python 3.8 active.
Configure Packages¶
Create a Virtual Environment for your workspace.
Bash | |
---|---|
Activate the Virtual Environment:
Bash | |
---|---|
Install scapy
.
pip install scapy
Configure Workspace¶
In your workspace, create two folders:
webroot
work
End Results¶
Here’s what my VSCode window looks like after the setup, with version checks in the terminal.