Skip to content

Instantly share code, notes, and snippets.

@pritul2
Last active March 1, 2022 11:54
Show Gist options
  • Save pritul2/8a9381c214e7b48c0de01f262fa7e185 to your computer and use it in GitHub Desktop.
Save pritul2/8a9381c214e7b48c0de01f262fa7e185 to your computer and use it in GitHub Desktop.
1. Installation
sudo apt-get install python3.x
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.x get-pip.py
pip install --upgrade virtualenv
2. Creating the virtual environment
Go to pycharm add python interpreter in virtualenv envirnomnet
Obtain installed path of python [usually /usr/bin/python3.x]
Set base interpreter to that path
Create venv folder -> project_name and set the path to that location
3. Adding the virtual env. activation path to the bashrc
Go to venv folder -> project_name -> bin folder and copy path [pwd]
Open bashrc [gedit ~/.bashrc]
Create alias by adding line : alias pyenv3.7='source ~/Documents/venv/car-price-prediction-poc-3.7.2/bin/activate'
Now to execute that environment type pyenv3.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment