Using virtual environments
Python has a very neat feature called virtual environments. Using these virtual environments, you can keep track of dependencies of different Python projects and keep different projects separate from the main environment.
Let's create a new folder in Kali where all our project files will be present:
- Open your Kali home directory and create a new folder called
python-hacking
. All our future work will be done here. - Open this folder in VS Code:
- Inside the
python-hacking
folder, create a new folder calledm1-hello-world
. Here we will test our virtual environment. Inside them1-hello-world
folder, create a new file calledmain.py
. - Check whether the Python package manager,
pip
, is installed properly in Kali using the following command in terminal:pip3 –version
You should see the following output:
- If you see an output similar to the...