python --versionPython 3.11.x (or your version)python --versionconda --versionpython3 --version/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python
python3 --version
Most Linux distributions come with Python pre-installed. To ensure you have the latest version:
# Update package list
sudo apt update
# Install Python 3.11
sudo apt install python3.11 python3-pip
# Verify
python3 --version
pip3 --version
Open Terminal/Command Prompt and run:
# Install all required packages at once
pip install numpy matplotlib scikit-learn jupyter seaborn pandas
# Or install individually:
pip install numpy # Numerical computing
pip install matplotlib # Plotting and visualization
pip install scikit-learn # Machine learning library
pip install jupyter # Interactive notebooks
pip install seaborn # Statistical visualization
pip install pandas # Data manipulation
For Windows: Use pip instead of pip3
For macOS/Linux: Use pip3 instead of pip
# These are already included in Anaconda:
conda install numpy matplotlib scikit-learn jupyter seaborn pandas
# If any are missing:
conda install -c conda-forge <package_name>
requirements.txt with:
numpy>=1.24.0
matplotlib>=3.7.0
scikit-learn>=1.3.0
jupyter>=1.0.0
seaborn>=0.12.0
pandas>=2.0.0
pip install -r requirements.txt
# Navigate to your project folder
cd /path/to/your/project
# Start Jupyter
jupyter notebook
# Your browser should open automatically
# If not, copy the URL shown in terminal (e.g., http://localhost:8888)
import numpy as np
print("Hello, Neural Networks!")
print(f"NumPy version: {np.__version__}")
Copy this into a new Jupyter notebook cell or Python file:
# Verification Script for Lesson 4
import sys
print("=" * 50)
print("LESSON 4: Neural Networks Setup Verification")
print("=" * 50)
print()
# Python version
print(f"Python version: {sys.version.split()[0]}")
if sys.version_info < (3, 8):
print(" Warning: Python 3.8+ recommended")
print()
# Required packages
packages = {
'numpy': 'NumPy',
'matplotlib': 'Matplotlib',
'sklearn': 'scikit-learn',
'jupyter': 'Jupyter',
'seaborn': 'Seaborn',
'pandas': 'Pandas'
}
all_good = True
for module, name in packages.items():
try:
if module == 'sklearn':
import sklearn
version = sklearn.__version__
else:
imported = __import__(module)
version = imported.__version__
print(f"{name:<15} version {version}")
except ImportError:
print(f"{name:<15} NOT INSTALLED")
all_good = False
print()
if all_good:
print("All packages installed successfully!")
print("You're ready for Lesson 4!")
else:
print("Some packages are missing.")
print("Please install missing packages using:")
print("pip install <package_name>")
==================================================
LESSON 4: Neural Networks Setup Verification
==================================================
Python version: 3.11.5
NumPy version 1.24.3
Matplotlib version 3.7.2
scikit-learn version 1.3.0
Jupyter version 1.0.0
Seaborn version 0.12.2
Pandas version 2.0.3
All packages installed successfully!
You're ready for Lesson 4!
Windows:
python -m pip install numpy
macOS/Linux:
python3 -m pip install numpy
macOS/Linux:
pip3 install --user numpy matplotlib scikit-learn
Windows: Run Command Prompt as Administrator
# Check which Python you're using:
which python # macOS/Linux
where python # Windows
# Use specific version:
python3.11 -m pip install numpy
# Reinstall Jupyter
pip install --upgrade jupyter
# Or use specific command
python -m jupyter notebook
Restart kernel: In Jupyter: Kernel → Restart
# Check Python path:
import sys
print(sys.executable)
print(sys.path)
# Use a faster mirror:
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org numpy
python -m pip install --upgrade pipNo installation needed! Use Google Colab for cloud-based Jupyter notebooks.
# In first cell of Colab notebook:
!pip install --upgrade numpy matplotlib scikit-learn seaborn
# Then run the lesson code as normal
Week before lesson:
Day of lesson:
# Run on each computer:
pip install numpy matplotlib scikit-learn jupyter seaborn pandas
# Verify on each:
python verification_script.py
Always have ready:
Once installation is complete:
neural-networks-starter.ipynbQuestions? Contact us at info@evolveaiinstitute.com