SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
Python Setup for
Dummies
Rajesh Rajamani
rajesh.r6r@gmail.com
Assumptions
This manual assumes that the user has reasonable privileges over the laptop or desktop where
Python is being installed. If you don’t have such privileges (such as using a work laptop) please
ask your IT team.
The steps discussed further are good for a beginner user for Python . In case you are an
advanced user , you should not be reading this manual.
These installation instructions are good for Windows 10 OS and apply fine for older versions
upto Windows 7 .
There are various modules and packages that are available to provide additional functionality to
your Python project . These are not installed by default and have to be installed separately .
It is a good idea for your laptop / desktop to have a working internet connection which allows
you to install python packages easily. Although one can install a python package offline , often
dependencies of a package become a challenge in offline installation.
Sections In This Manual
1. Installing Python
Detailed instructions to install Python
2. Installing Packages for Python
Detailed instructions to additional packages for Python
1. Installing Python
Detailed instructions to install Python
If you have already installed Python successfully , you can go to Section 2 straight away !.
Downloading the right version
Open your favorite browser and go the following url : https://www.python.org
Go to Downloads and click the button ( Python 3.7.4 ) shown below. (Note : If you want a different
version click on the “All Releases” link and explore further.)
This should download the installer in your Downloads folder . If it is successful proceed further.
Installing other versions of Python
Once you click on “All Releases” link you will be able to see a list of all the versions available for
installation. Only if you know what you are doing , proceed further. Else play safe.
Setting up things
Ensure to click the checkbox “Add Python 3.7 to PATH”. This will add the references for you .
Ensure to click the checkbox “Add
Python 3.7 to PATH”. This will add the
references for you .
We don’t want a long path such
as this to install as it would be
cumbersome later during
development. Hence click on
“Customize Installation”
Additional Features at Installation
Check all the options . They are very useful for a beginner.
Setting Up Installation Path
In this screen , there are other advanced options . But for now we have checked all that are
required for a beginner.
We have now mentioned a custom
path which is easy and short. You
can chose the path that you are
comfortable. But choose wisely.
Once everything is
set , hit the Install
button
Installation Success
You should see such a screen . Don’t worry about the path length limit .
Verifying the Physical Path ( Optional )
Note : This is the path we setup earlier
Verifying Environment Variables ( Optional )
Note : Because we wanted to add the installation folder to path in the first step.
Open System Information Under Environment Variables you can see that the path is added
2. Installing Packages for Python
Detailed instructions to install Packages for Python
An Introduction to Packages
Packages are specific features that aid you in various stages of a development .
Some exceptionally popular packages
Package Usage
numpy A fundamental package for scientific computing with Python
pandas pandas is an open source, BSD-licensed library providing
high-performance, easy-to-use data structures and data analysis
tools for the Python programming language.
nltk All Natural Language Processing tools with Python
sklearn All Machine Learning tools with Python
Installing Packages with Python
Can be classified into 2 major categories .
1. Online
Pros: Package dependencies and version compatibility are automatically taken care off.
Cons: Need a reasonable internet connection
2. Offline
Pros: Can help in an environment where internet connection is not possible ( such as
production servers )
Cons: Package dependencies and version compatibility needs to be manually managed.
Can become cumbersome when there are multiple dependencies.
Installing Python Packages when you are
“Online”
If you remember we had selected the feature “ pip “ while installing . We will be
using pip to install packages
We will now see how we can install packages with pip.
If your pip version has an upgrade , whenever you use pip it will automatically
prompt you for an upgrade.
Installing a package with pip
Lets install pandas.
Step 1 : Open Command Prompt
Step 2: Navigate to the directory C:Python37
Step 3: Enter the command pip install pandas and press Enter key.
Now let’s see what happened when I entered this command in my laptop
Installing Pandas with pip
Downloading Pandas
Downloading dependencies numpy,
python-dateutil,six,pytz
Detecting that we are using a older
version of pip and prompting for a
newer version (optional)
Installing multiple packages with pip
Sometimes you might need a lot of packages that need to be installed at once. Can we do that
with pip ?
Yes. Let’s see how we can do that.
Before starting the installation we need to create a simple text file called requirements.txt. The
name of the file can be anything as you wish , but a good practice is to use “requirements”
Here in my example , I’m installing 3 packages with 2 where the version being specified.
You can use == operator for an exact version math and >= or <= for a relative version . If you
don’t mention the version , then the latest version will be installed
How to use the requirements.txt
Let’s install packages using requirements.txt
Step 1 : Open Command Prompt
Step 2: Navigate to the directory C:Python37
Step 3: Enter the command pip install -r “D:SoftwaresPythonrequirements_3.7.txt”
Please ensure to mention the correct path of your file in the command above.
Now let’s see what happened when I entered this command in my laptop
Installing multiple packages with
requirements.txt
The last line provides vital information about the command that we fired . We fired the command with 3 packages , but
pip has managed to install not just the ones we wanted , but also the additional dependencies that are required for the
package to work well.
Now we will see how offline installation can be done.
Installing Python Packages when you are
offline
Caution : As I told earlier , offline installation means you have to physically ensure the sequence
of dependencies , versions before a particular package can be installed.
For our case , let’s install a package on offline mode. In order to install a package offline , you
have to download either the wheel file or the source file .
Wheel File :
.whl format . Compiled binary version of package . Therefore no need to compile it in .
Source File:
.py format mostly . Has to be compiled in the machine where you install it.
Let’s see an example for both.
Installing from whl file
Step 1 : Download the .whl file for the desired package
Step 2: Open Command Prompt
Step 3: Navigate to the directory C:Python37
Step 4: Enter the command pip install <Complete path with your wheel file name>
Please ensure to mention the correct path of your file in the command above.
Installing from source file
Source files are normally available as zip or tar files . Hence a couple of additional steps.
Step 1 : Download the .tar / .zip file for the desired package
Step 2: Uncompress the tar file and verify if you have the setup.py
Step 3: Open Command Prompt
Step 4: Navigate to the directory C:Python37
Step 5: Enter the command python <complete path of the setup.py> --install
Note: Because we are executing a .py file ( which is a python script) we are using the command
“python” and not “pip”
Thank You

Más contenido relacionado

La actualidad más candente

Alternatives to Proprietary Software
Alternatives to Proprietary SoftwareAlternatives to Proprietary Software
Alternatives to Proprietary Softwaretechlug
 
A quick overview of why to use and how to set up iPython notebooks for research
A quick overview of why to use and how to set up iPython notebooks for researchA quick overview of why to use and how to set up iPython notebooks for research
A quick overview of why to use and how to set up iPython notebooks for researchAdam Pah
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linuxtechlug
 
Making Py Pi Sux Less Key
Making Py Pi Sux Less KeyMaking Py Pi Sux Less Key
Making Py Pi Sux Less KeyAndreas Jung
 
The magic of IPython Notebook
The magic of IPython NotebookThe magic of IPython Notebook
The magic of IPython NotebookAlexey Agapov
 
First python project
First python projectFirst python project
First python projectNeetu Jain
 
PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.Francesco Fullone
 
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverNginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverwruben
 
Windows Server and Fast CGI Technologies For PHP
Windows Server and Fast CGI Technologies For PHPWindows Server and Fast CGI Technologies For PHP
Windows Server and Fast CGI Technologies For PHPTim Keller
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
Running PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewRunning PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewWes Yanaga
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)Tobias Liebig
 
Python - The Good, The Bad and The ugly
Python - The Good, The Bad and The ugly Python - The Good, The Bad and The ugly
Python - The Good, The Bad and The ugly Eran Shlomo
 
Console Apps: php artisan forthe:win
Console Apps: php artisan forthe:winConsole Apps: php artisan forthe:win
Console Apps: php artisan forthe:winJoe Ferguson
 

La actualidad más candente (19)

Alternatives to Proprietary Software
Alternatives to Proprietary SoftwareAlternatives to Proprietary Software
Alternatives to Proprietary Software
 
A quick overview of why to use and how to set up iPython notebooks for research
A quick overview of why to use and how to set up iPython notebooks for researchA quick overview of why to use and how to set up iPython notebooks for research
A quick overview of why to use and how to set up iPython notebooks for research
 
Running Symfony
Running SymfonyRunning Symfony
Running Symfony
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linux
 
Making Py Pi Sux Less Key
Making Py Pi Sux Less KeyMaking Py Pi Sux Less Key
Making Py Pi Sux Less Key
 
The magic of IPython Notebook
The magic of IPython NotebookThe magic of IPython Notebook
The magic of IPython Notebook
 
First python project
First python projectFirst python project
First python project
 
Presentation
PresentationPresentation
Presentation
 
PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.PHP 4? OMG! A small vademecum for obsolete software migration.
PHP 4? OMG! A small vademecum for obsolete software migration.
 
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverNginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
 
Windows Server and Fast CGI Technologies For PHP
Windows Server and Fast CGI Technologies For PHPWindows Server and Fast CGI Technologies For PHP
Windows Server and Fast CGI Technologies For PHP
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
Running PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewRunning PHP on Windows Technical Overview
Running PHP on Windows Technical Overview
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
T3DD13 - Automated deployment for TYPO3 CMS (Workshop)
 
Python - The Good, The Bad and The ugly
Python - The Good, The Bad and The ugly Python - The Good, The Bad and The ugly
Python - The Good, The Bad and The ugly
 
Baabtra django framework installation and sample project using aptana
Baabtra django framework installation and sample project using aptanaBaabtra django framework installation and sample project using aptana
Baabtra django framework installation and sample project using aptana
 
Console Apps: php artisan forthe:win
Console Apps: php artisan forthe:winConsole Apps: php artisan forthe:win
Console Apps: php artisan forthe:win
 
Asp.net core tutorial
Asp.net core tutorialAsp.net core tutorial
Asp.net core tutorial
 

Similar a Python setup for dummies

L2 - Install Python.pptx
L2 - Install Python.pptxL2 - Install Python.pptx
L2 - Install Python.pptxEloAOgardo
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtInexture Solutions
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftwareWilliam Hart
 
Step-by-Step Instructions on How to Install Python 3
Step-by-Step Instructions on How to Install Python 3Step-by-Step Instructions on How to Install Python 3
Step-by-Step Instructions on How to Install Python 3Hedaro
 
Intro to Programming Week 2_Python Installation.pptx
Intro to Programming Week 2_Python Installation.pptxIntro to Programming Week 2_Python Installation.pptx
Intro to Programming Week 2_Python Installation.pptxiksanbukhori
 
Pesta Rilis ParrotOS 4.7
Pesta Rilis ParrotOS 4.7Pesta Rilis ParrotOS 4.7
Pesta Rilis ParrotOS 4.7Sabar Suwarsono
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesLarry Cai
 
Installing application in ubuntu [autosaved]
Installing application in ubuntu [autosaved]Installing application in ubuntu [autosaved]
Installing application in ubuntu [autosaved]K Senthil Kumar
 
Respositórios do Ubuntu, santo apt-get e outras coisas
Respositórios do Ubuntu, santo apt-get e outras coisasRespositórios do Ubuntu, santo apt-get e outras coisas
Respositórios do Ubuntu, santo apt-get e outras coisasQuefo.me
 
6_getting__started_with_python.pdf
6_getting__started_with_python.pdf6_getting__started_with_python.pdf
6_getting__started_with_python.pdfmaheshrawal2006
 
getting started with python6 (1).pdf
getting  started with python6 (1).pdfgetting  started with python6 (1).pdf
getting started with python6 (1).pdfSuyashsingh992747
 

Similar a Python setup for dummies (20)

L2 - Install Python.pptx
L2 - Install Python.pptxL2 - Install Python.pptx
L2 - Install Python.pptx
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txt
 
How to Install Python on Linux
How to Install Python on LinuxHow to Install Python on Linux
How to Install Python on Linux
 
Python Lecture 0
Python Lecture 0Python Lecture 0
Python Lecture 0
 
How to Install Python on Windows
How to Install Python on WindowsHow to Install Python on Windows
How to Install Python on Windows
 
10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware10 11-hart installing pythonsoftware
10 11-hart installing pythonsoftware
 
Easy install
Easy installEasy install
Easy install
 
python-handbook.pdf
python-handbook.pdfpython-handbook.pdf
python-handbook.pdf
 
Software Instructions
Software InstructionsSoftware Instructions
Software Instructions
 
Step-by-Step Instructions on How to Install Python 3
Step-by-Step Instructions on How to Install Python 3Step-by-Step Instructions on How to Install Python 3
Step-by-Step Instructions on How to Install Python 3
 
Intro to Programming Week 2_Python Installation.pptx
Intro to Programming Week 2_Python Installation.pptxIntro to Programming Week 2_Python Installation.pptx
Intro to Programming Week 2_Python Installation.pptx
 
Pesta Rilis ParrotOS 4.7
Pesta Rilis ParrotOS 4.7Pesta Rilis ParrotOS 4.7
Pesta Rilis ParrotOS 4.7
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
Installing application in ubuntu [autosaved]
Installing application in ubuntu [autosaved]Installing application in ubuntu [autosaved]
Installing application in ubuntu [autosaved]
 
How java works
How java worksHow java works
How java works
 
How java works
How java worksHow java works
How java works
 
Respositórios do Ubuntu, santo apt-get e outras coisas
Respositórios do Ubuntu, santo apt-get e outras coisasRespositórios do Ubuntu, santo apt-get e outras coisas
Respositórios do Ubuntu, santo apt-get e outras coisas
 
6_getting__started_with_python.pdf
6_getting__started_with_python.pdf6_getting__started_with_python.pdf
6_getting__started_with_python.pdf
 
getting started with python6 (1).pdf
getting  started with python6 (1).pdfgetting  started with python6 (1).pdf
getting started with python6 (1).pdf
 
Python - mySOL
Python - mySOLPython - mySOL
Python - mySOL
 

Último

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Último (20)

Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

Python setup for dummies

  • 1. Python Setup for Dummies Rajesh Rajamani rajesh.r6r@gmail.com
  • 2. Assumptions This manual assumes that the user has reasonable privileges over the laptop or desktop where Python is being installed. If you don’t have such privileges (such as using a work laptop) please ask your IT team. The steps discussed further are good for a beginner user for Python . In case you are an advanced user , you should not be reading this manual. These installation instructions are good for Windows 10 OS and apply fine for older versions upto Windows 7 . There are various modules and packages that are available to provide additional functionality to your Python project . These are not installed by default and have to be installed separately . It is a good idea for your laptop / desktop to have a working internet connection which allows you to install python packages easily. Although one can install a python package offline , often dependencies of a package become a challenge in offline installation.
  • 3. Sections In This Manual 1. Installing Python Detailed instructions to install Python 2. Installing Packages for Python Detailed instructions to additional packages for Python
  • 4. 1. Installing Python Detailed instructions to install Python If you have already installed Python successfully , you can go to Section 2 straight away !.
  • 5. Downloading the right version Open your favorite browser and go the following url : https://www.python.org Go to Downloads and click the button ( Python 3.7.4 ) shown below. (Note : If you want a different version click on the “All Releases” link and explore further.) This should download the installer in your Downloads folder . If it is successful proceed further.
  • 6. Installing other versions of Python Once you click on “All Releases” link you will be able to see a list of all the versions available for installation. Only if you know what you are doing , proceed further. Else play safe.
  • 7. Setting up things Ensure to click the checkbox “Add Python 3.7 to PATH”. This will add the references for you . Ensure to click the checkbox “Add Python 3.7 to PATH”. This will add the references for you . We don’t want a long path such as this to install as it would be cumbersome later during development. Hence click on “Customize Installation”
  • 8. Additional Features at Installation Check all the options . They are very useful for a beginner.
  • 9. Setting Up Installation Path In this screen , there are other advanced options . But for now we have checked all that are required for a beginner. We have now mentioned a custom path which is easy and short. You can chose the path that you are comfortable. But choose wisely. Once everything is set , hit the Install button
  • 10. Installation Success You should see such a screen . Don’t worry about the path length limit .
  • 11. Verifying the Physical Path ( Optional ) Note : This is the path we setup earlier
  • 12. Verifying Environment Variables ( Optional ) Note : Because we wanted to add the installation folder to path in the first step. Open System Information Under Environment Variables you can see that the path is added
  • 13. 2. Installing Packages for Python Detailed instructions to install Packages for Python
  • 14. An Introduction to Packages Packages are specific features that aid you in various stages of a development . Some exceptionally popular packages Package Usage numpy A fundamental package for scientific computing with Python pandas pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language. nltk All Natural Language Processing tools with Python sklearn All Machine Learning tools with Python
  • 15. Installing Packages with Python Can be classified into 2 major categories . 1. Online Pros: Package dependencies and version compatibility are automatically taken care off. Cons: Need a reasonable internet connection 2. Offline Pros: Can help in an environment where internet connection is not possible ( such as production servers ) Cons: Package dependencies and version compatibility needs to be manually managed. Can become cumbersome when there are multiple dependencies.
  • 16. Installing Python Packages when you are “Online” If you remember we had selected the feature “ pip “ while installing . We will be using pip to install packages We will now see how we can install packages with pip. If your pip version has an upgrade , whenever you use pip it will automatically prompt you for an upgrade.
  • 17. Installing a package with pip Lets install pandas. Step 1 : Open Command Prompt Step 2: Navigate to the directory C:Python37 Step 3: Enter the command pip install pandas and press Enter key. Now let’s see what happened when I entered this command in my laptop
  • 18. Installing Pandas with pip Downloading Pandas Downloading dependencies numpy, python-dateutil,six,pytz Detecting that we are using a older version of pip and prompting for a newer version (optional)
  • 19. Installing multiple packages with pip Sometimes you might need a lot of packages that need to be installed at once. Can we do that with pip ? Yes. Let’s see how we can do that. Before starting the installation we need to create a simple text file called requirements.txt. The name of the file can be anything as you wish , but a good practice is to use “requirements” Here in my example , I’m installing 3 packages with 2 where the version being specified. You can use == operator for an exact version math and >= or <= for a relative version . If you don’t mention the version , then the latest version will be installed
  • 20. How to use the requirements.txt Let’s install packages using requirements.txt Step 1 : Open Command Prompt Step 2: Navigate to the directory C:Python37 Step 3: Enter the command pip install -r “D:SoftwaresPythonrequirements_3.7.txt” Please ensure to mention the correct path of your file in the command above. Now let’s see what happened when I entered this command in my laptop
  • 21. Installing multiple packages with requirements.txt The last line provides vital information about the command that we fired . We fired the command with 3 packages , but pip has managed to install not just the ones we wanted , but also the additional dependencies that are required for the package to work well. Now we will see how offline installation can be done.
  • 22. Installing Python Packages when you are offline Caution : As I told earlier , offline installation means you have to physically ensure the sequence of dependencies , versions before a particular package can be installed. For our case , let’s install a package on offline mode. In order to install a package offline , you have to download either the wheel file or the source file . Wheel File : .whl format . Compiled binary version of package . Therefore no need to compile it in . Source File: .py format mostly . Has to be compiled in the machine where you install it. Let’s see an example for both.
  • 23. Installing from whl file Step 1 : Download the .whl file for the desired package Step 2: Open Command Prompt Step 3: Navigate to the directory C:Python37 Step 4: Enter the command pip install <Complete path with your wheel file name> Please ensure to mention the correct path of your file in the command above.
  • 24. Installing from source file Source files are normally available as zip or tar files . Hence a couple of additional steps. Step 1 : Download the .tar / .zip file for the desired package Step 2: Uncompress the tar file and verify if you have the setup.py Step 3: Open Command Prompt Step 4: Navigate to the directory C:Python37 Step 5: Enter the command python <complete path of the setup.py> --install Note: Because we are executing a .py file ( which is a python script) we are using the command “python” and not “pip”