Last active
October 19, 2023 10:56
-
-
Save jstrosch/de20131dda2aac5cd1116dd44b8f2474 to your computer and use it in GitHub Desktop.
This script will setup Python virtualenv, I made it specifically for setting up Cuckoo. Please see the notes in the script before running.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Author: Josh Stroschein | |
# Source: https://askubuntu.com/questions/244641/how-to-set-up-and-use-a-virtual-python-environment-in-ubuntu | |
# NOTES: Run this script as: sudo -u <USERNAME> cuckoo-setup-virtualenv.sh | |
# Additionally, your environment may not allow the script to source bashrc and you may need to do this manually after the script completes | |
# install virtualenv | |
sudo apt-get update && sudo apt-get -y install virtualenv | |
# install virtualenvwrapper | |
sudo apt-get -y install virtualenvwrapper | |
echo "source /usr/share/virtualenvwrapper/virtualenvwrapper.sh" >> ~/.bashrc | |
# install pip for python3 | |
sudo apt-get -y install python3-pip | |
# turn on bash auto-complete for pip | |
pip3 completion --bash >> ~/.bashrc | |
# avoid installing with root | |
pip3 install --user virtualenvwrapper | |
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3" >> ~/.bashrc | |
echo "source ~/.local/bin/virtualenvwrapper.sh" >> ~/.bashrc | |
export WORKON_HOME=~/.virtualenvs | |
echo "export WORKON_HOME=~/.virtualenvs" >> ~/.bashrc | |
echo "export PIP_VIRTUALENV_BASE=~/.virtualenvs" >> ~/.bashrc | |
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can't say for sure but looks like there may be two issues - first, you have a typo in the last octet of your IP address, ".1011". I'd try removing that. The second is that there is an error stating that the Vm already exists so I would try either removing it and starting over or using different information to set it up.