Skip to content

Instantly share code, notes, and snippets.

@ENez7
Created January 23, 2023 23:53
Show Gist options
  • Save ENez7/481bf811ab0d4f0800c2e15b2a4aaac1 to your computer and use it in GitHub Desktop.
Save ENez7/481bf811ab0d4f0800c2e15b2a4aaac1 to your computer and use it in GitHub Desktop.
Virtual enviroment

Windows installation guide

  1. Download Python 3 for Windows
  2. Run executable installer
  3. Verify Python was installed
    • Open CMD (win + r, then type "cmd" without the quotes)
    • Type "python", you should get the info of the python version
    • exit() to quit
  4. Verify pip was installed
    • Open CMD
    • Type "pip -V", if installed successfully, you should get the installation route
  5. Add python path to environment variables

To run python scripts, open CMD, move onto your script's directory and enter: python scriptName.py

Setting a virtual environment - Windows

mkdir directoryName
cd directoryName
python -m venv env  // env is the name of the virtual environment
env\Scripts\activate.bat
pip install bokeh

Setting a virtual environment - Linux system

mkdir directoryName
cd directoryName
python[version] -m venv env
source env/bin/activate
pip install bokeh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment