0% found this document useful (0 votes)
56 views15 pages

Ai Lab

Uploaded by

rohanbansal3991
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views15 pages

Ai Lab

Uploaded by

rohanbansal3991
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Installation of Python Environment

for AI and Machine learning


Open PowerShell:
PowerShell is a command-line shell and object
oriented scripting language that’s used to
automate administrative tasks and configure
system settings It can be used to automate
practically anything in the operating system. It
also replaced Command Prompt as the default
system shell for Windows 10.
• Press “⊞ Windows”
• Enter “PowerShell” into the search bar
• Click “Run as Administrator”
Open the Home Directory:
The Change Directory (cd) command is used to change
the current working directory to the specified
directory. It can navigate to absolute and relative paths
that start from the root and current working directory,
respectively. It can also navigate to paths stored
in variables and environment variables.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
cd $HOME\desktop

3. Press “Enter”
Install Virtualenv:
Virtualenv is a program that’s used in Python to create
and manage virtual environments. It can specify which
Python version and directory is used to create the
virtual environment. It also installs all the necessary
files into the specified directory instead of the
systemwide Python installation directory.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
python -m pip install virtualenv

3. Press “Enter”
Create the Virtual Environment:
The Virtual Environment is an isolated Python installation
directory that has its own interpreter, site-packages, and
scripts. It mostly gets used to prevent version conflicts
between dependencies from different projects. It also gets
used to meet dependency requirements of different
programs from GitHub.

1. Find the Python version from below these instructions


2. Copy the provided command
3. Paste the command into PowerShell
4. Press “Enter”
Create the Virtual Environment:
Default:
python -m venv venv
Python 3.5:
python -m virtualenv --python python35 venv35
Python 3.6:
python -m virtualenv --python python36 venv36
Python 3.7:
python -m virtualenv --python python37 venv37
Python 3.8:
python -m virtualenv --python python38 venv38
Python 3.9:
python -m virtualenv --python python39 venv39
Activate the Virtual Environment:
The Activate script is used to start the virtual
environment. It prepends the virtual environment path
to the PATH environment variable which sets the new
Python interpreter and package manager as the default
version. It also sets packages to install in the virtual
environment installation directory.
1. Find the Python version from below these instructions
2. Copy the provided command
3. Paste the command into PowerShell
4. Press “Enter”
Activate the Virtual Environment:
Default:
venv/scripts/activatePython 3.5:
venv35/scripts/activatePython 3.6:
venv36/scripts/activatePython 3.7:
venv37/scripts/activatePython 3.8:
venv38/scripts/activatePython 3.9:
venv39/scripts/activate
Install NumPy:
Numerical Python (NumPy) is a C library that’s used in
Python to work with arrays. It provides a multi-
dimensional array object that’s up to 50x faster than
traditional Python lists. It also includes mathematical
functions such as trigonometric, statistical, and
algebraic routines to perform on the arrays.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
python -m pip install numpy
3. Press “Enter”
Install Pandas:
Python Data Analysis (Pandas) is a Python library that’s
used to work with structured data. It provides data
structures and operations to manipulate numerical
tables and time series. It also includes utilities that
range from parsing multiple file formats to converting
data tables into NumPy arrays.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
python -m pip install pandas
3. Press “Enter”
Install SciPy:
Scientific Python (SciPy) is a Python library that’s used
to perform numerical computations in mathematics,
science, and engineering. It provides a range of
commands to manipulate and visualize multi-
dimensional arrays. It also includes numerical routines
like numerical integration and optimization.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
python -m pip install scipy

3. Press “Enter”
Install Pillow:
Pillow is a Python library that’s used to manipulate
images in the Python interpreter. It enables Python to
open, manipulate, and save images in most image file
formats. It also has image processing capabilities such
as resizing, cropping, rotating, greyscaling,
transforming, and adding text to images.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
python -m pip install pillow

3. Press “Enter”
Install Matplotlib:
Matplotlib is a Python library that’s used to create
static, animated, and interactive visualizations. It
produces production-quality graphs, charts, and figures
in a variety of formats. It can also be used in Python
scripts, shells, web application servers, and graphical
user interface toolkits.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
python -m pip install matplotlib
3. Press “Enter”
Install OpenCV:
Open Source Computer Vision Library (OpenCV) is a C++
library that’s used in Python to build real-time
computer vision applications. It performs image
processing, video capture and analysis, face detection,
and object detection. It also has over 2,500 algorithms
that range from classic to state of the art.
1. Copy the command from below these instructions
2. Paste the command into PowerShell
python -m pip install opencv-python
3. Press “Enter”
Install Scikit-Learn:
Scikit-Learn is a Python library that’s used to build
train, and deploy machine learning models for
prototyping. It provides algorithms for regression,
clustering, and classification. It also includes
utilities for preprocessing data, model fitting, and
model selection and evaluation.
1. Copy the command from below these
instructions
2. Paste the command into PowerShell
python -m pip install scikit-learn
3. Press “Enter”

You might also like