- Ensure Python is installed on your system - https://www.python.org/downloads/
- Open Terminal in VSCode
- Ensure you're in the project folder
<path-to-finance-with-python> folder
- Create Virtual Environment: https://docs.python.org/3/library/venv.html
python -m venv finance_env
- Activate Virtual Environment
- Mac/Linux:
source finance_env/bin/activate
- Windows:
.\finance_env\Scripts\activate
- Mac/Linux:
- Verify Activation
- Mac/Linux:
which python
- Windows:
where python
- Mac/Linux:
- Install required packages
pip install numpy pandas matplotlib yfinance mplfinance plotly jupyter
- Create requirements.txt file
pip freeze > requirements.txt
- To install from requirements.txt file:
pip install -r requirements.txt
- To Deactivate virtual environment (when needed)
- Mac/Linux/Windows:
deactivate
- Mac/Linux/Windows:
- VSCode Integration
- Press Ctrl/Cmd + Shift + P
- Type: "Python: Select Interpreter"
- Choose the interpreter: finance_env
- Open Jupyter Notebook:
- In Terminal:
jupyter notebook
- This should open in browser
- In Terminal:
- Create a new Python3 notebook in the desired folder