Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 91 additions & 56 deletions AI in Python on Windows/README.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,143 @@
# AI in Python on Windows

This guide will help you set up a Python environment on a Windows machine to develop and work on AI and Machine Learning projects. We'll walk through setting up Python, installing key AI libraries, and running a simple AI program.
This guide will help you set up a Python environment on a Windows machine to develop and work on AI and Machine Learning projects. We'll walk through setting up Python, installing key AI libraries, and running a simple AI program.

## Table of Contents

1. [Introduction](#1-introduction)
2. [Prerequisites](#2-prerequisites)
3. [Setting up Python on Windows](#3-setting-up-python-on-windows)
3.1. [Download Python](#31-download-python)
3.2. [Verify Installation](#32-verify-installation)
3.3. [Install a Virtual Environment (Optional but Recommended)](#33-install-a-virtual-environment-optional-but-recommended)
3.1. [Download Python](#31-download-python)
3.2. [Verify Installation](#32-verify-installation)
3.3. [Install a Virtual Environment (Optional but Recommended)](#33-install-a-virtual-environment-optional-but-recommended)
4. [Installing AI Libraries](#4-installing-ai-libraries)
4.1. [NumPy](#41-numpy)
4.2. [Pandas](#42-pandas)
4.3. [Matplotlib & Seaborn](#43-matplotlib--seaborn)
4.4. [Scikit-learn](#44-scikit-learn)
4.5. [TensorFlow](#45-tensorflow)
4.6. [PyTorch](#46-pytorch)
4.7. [Jupyter Notebook](#47-jupyter-notebook)
4.1. [NumPy](#41-numpy)
4.2. [Pandas](#42-pandas)
4.3. [Matplotlib & Seaborn](#43-matplotlib--seaborn)
4.4. [Scikit-learn](#44-scikit-learn)
4.5. [TensorFlow](#45-tensorflow)
4.6. [PyTorch](#46-pytorch)
4.7. [Jupyter Notebook](#47-jupyter-notebook)
5. [Running a Simple AI Script](#5-running-a-simple-ai-script)
6. [AI Libraries Overview](#6-ai-libraries-overview)
6. [AI Libraries Overview](#6-ai-libraries-overview)
7. [Resources](#7-resources)

## 1. Introduction
Artificial Intelligence (AI) is revolutionizing numerous industries by allowing computers to learn from data and make decisions without human intervention. Python, with its simplicity and extensive ecosystem of libraries, is the most popular language for AI development. In this guide, you'll learn how to set up and use Python for AI development on a Windows machine.

## 2. Prerequisites
Before you start, ensure that your system meets the following requirements:
- **Operating System:** Windows 10 or higher
- **Python:** Version 3.8 or higher
- **RAM:** At least `8 GB` (more is better for heavy AI tasks)
- Internet: Required for downloading libraries and datasets
Artificial Intelligence (AI) is revolutionizing numerous industries by allowing computers to learn from data and make decisions without human intervention. Python, with its simplicity and extensive ecosystem of libraries, is the most popular language for AI development. In this guide, you'll learn how to set up and use Python for AI development on a Windows machine.

## 2. Prerequisites

Before you start, ensure that your system meets the following requirements:

Basic knowledge of Python programming is also recommended.
- **Operating System:** Windows 10 or higher
- **Python:** Version 3.8 or higher
- **RAM:** At least `8 GB` (more is better for heavy AI tasks)
- **Internet:** Required for downloading libraries and datasets

Basic knowledge of Python programming is also recommended.

## 3. Setting up Python on Windows
### 3.1. Download Python:

### 3.1. Download Python

- Visit the official [Python website](https://www.python.org/downloads/) and download the latest stable version for Windows.
- Make sure to select the option to add Python to PATH during installation.

### 3.2. Verify Installation:
Open the Command Prompt (search for `cmd` in the Start menu) and type:
### 3.2. Verify Installation

Open the Command Prompt (search for `cmd` in the Start menu) and type:

```bash
python --version
```

You should see the installed Python version.
You should see the installed Python version.

### 3.3. Install a Virtual Environment (Optional but Recommended)

Virtual environments allow you to isolate your project dependencies. To install:

### 3.3. Install a Virtual Environment (Optional but Recommended):
Virtual environments allow you to isolate your project dependencies. To install:
```bash
python -m venv ai_env
```
Activate the environment:

Activate the environment:

```bash
ai_env\Scripts\activate
```
To deactivate the environment, simply run:

To deactivate the environment, simply run:

```bash
deactivate
```

## 4. Installing AI Libraries
With Python set up, the next step is to install essential AI and machine learning libraries. Below is a list of commonly used libraries and their installation commands:

### 4.1. NumPy:
Provides support for large, multi-dimensional arrays and matrices.
With Python set up, the next step is to install essential AI and machine learning libraries. Below is a list of commonly used libraries and their installation commands:

### 4.1. NumPy

Provides support for large, multi-dimensional arrays and matrices.

```bash
pip install numpy
```
### 4.2. Pandas:

### 4.2. Pandas

A powerful data manipulation library.

```bash
pip install pandas
```

### 4.3. Matplotlib & Seaborn:
### 4.3. Matplotlib & Seaborn

For data visualization.

```bash
pip install matplotlib seaborn
```

### 4.4. Scikit-learn:
For classical machine learning algorithms.
### 4.4. Scikit-learn

For classical machine learning algorithms.

```bash
pip install scikit-learn
```

### 4.5. TensorFlow:
A popular deep learning framework.
### 4.5. TensorFlow

A popular deep learning framework.

```bash
pip install tensorflow
```

### 4.6. PyTorch:
Another leading deep learning library.
### 4.6. PyTorch

Another leading deep learning library.

```bash
pip install torch torchvision torchaudio
```

### 4.7. Jupyter Notebook:
To create and share documents containing live code, equations, visualizations, and narrative text.
```bash
pip install notebook
### 4.7. Jupyter Notebook

To create and share documents containing live code, equations, visualizations, and narrative text.

```bash
pip install notebook
```

## 5. Running a Simple AI Script
Once you've installed the libraries, you can run a simple AI script. Here's an example using a simple neural network with TensorFlow.

Once you've installed the libraries, you can run a simple AI script. Here's an example using a simple neural network with TensorFlow.

```python
import tensorflow as tf
from tensorflow.keras import layers
Expand Down Expand Up @@ -139,30 +169,35 @@ model.fit(x_train, y_train, epochs=5)
model.evaluate(x_test, y_test, verbose=2)
```

Save this script as `mnist_example.py` and run it using the Command Prompt:
Save this script as `mnist_example.py` and run it using the Command Prompt:

```bash
python mnist_example.py
```

You should see the model training and evaluating on the MNIST dataset.
You should see the model training and evaluating on the MNIST dataset.

## 6. AI Libraries Overview
- **NumPy:** Used for numerical computations and managing arrays. Essential for handling large datasets.

- **Pandas:** For data manipulation and analysis. Particularly useful for handling structured data like CSV files.
- **NumPy:** Used for numerical computations and managing arrays. Essential for handling large datasets.

- **Matplotlib & Seaborn:** Libraries for data visualization, enabling you to plot and analyze data effectively.
- **Pandas:** For data manipulation and analysis. Particularly useful for handling structured data like CSV files.

- **Scikit-learn:** A comprehensive library for classical machine learning models like linear regression, clustering, etc.
- **Matplotlib & Seaborn:** Libraries for data visualization, enabling you to plot and analyze data effectively.

- **TensorFlow & PyTorch:** Deep learning frameworks that are widely used in AI research and production environments.
- **Scikit-learn:** A comprehensive library for classical machine learning models like linear regression, clustering, etc.

- **Jupyter Notebook:** A fantastic tool for writing and running Python code in an interactive way. Ideal for experimenting with AI models.
- **TensorFlow & PyTorch:** Deep learning frameworks that are widely used in AI research and production environments.

- **Jupyter Notebook:** A fantastic tool for writing and running Python code in an interactive way. Ideal for experimenting with AI models.

## 7. Resources

Here are some resources to help you dive deeper into AI development in Python:

## 7. Resources
Here are some resources to help you dive deeper into AI development in Python:
1. [Python Official Documentation](https://docs.python.org/3/)
2. [TensorFlow Documentation](https://www.tensorflow.org/guide)
3. [PyTorch Tutorials Documentation](https://pytorch.org/tutorials/)
4. [Scikit-learn Documentation](https://scikit-learn.org/stable/user_guide.html)
3. [PyTorch Tutorials Documentation](https://pytorch.org/tutorials/)
4. [Scikit-learn Documentation](https://scikit-learn.org/stable/user_guide.html)

---
Loading