This project uses a Python virtual environment under .venv and depends on NumPy and pandas.
- Create/activate the virtual environment (if not already active):
python3 -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Select the interpreter in VS Code:
- Use "Python: Select Interpreter" and choose
.venv/bin/python. - Confirm the status bar shows
/Users/mac/Coding/Projects/ML/.venv/bin/python.
python MNIST.py- Ensure the correct interpreter is selected (
.venv/bin/python). - Verify installation:
pip show numpy pandas. - Reload VS Code window: "Developer: Reload Window".
- Reopen the folder so Pylance re-indexes the environment.
- Python: 3.13 (via
.venv) - Installed:
numpy==2.3.5,pandas==2.3.3
P.S. To anyone who is trying to clone this repo and testing it in your local device, beware that the CNN is very very slow, I remember I waited for 2 days to it to finish calculation to finally achieve a accuracy of 96.53% on the MNIST test dataset ... :( Enjoy..