hello everyone welcome to data science
with Harshit my name is Harshit
I'm a data science instructor and mentor
so as I talked about in my previous
video that we are going to cover the
entire data science domain all the four
branches be it path programming right
from the scratch understanding different
libraries and packages or you know
learning about statistical and
mathematical explanation behind all
those models or writing some cool
kick-ass machine learning and deep
learning algorithms so before you get
down to solving all those problems
whenever you have a data sense project
at hand the first thing that you have to
do is create a Python environment so in
this video I am going to cover how to
set up a cool ideal Python environment
for your data science project using
these three components coming up
so the first component out of the three
is the UNIX shell and hardly a day goes
by when a reader scientist or a software
engineer does not use a UNIX shell to
accomplish their plethora of tasks so
after a certain stage when your project
goes into production you will find
yourself working on Google Cloud or EWS
and most of them are Linux based and
requires some familiarity with the UNIX
shell so I put down a cheat sheet for
shell scripting if you don't know
already so you can have a look and we'll
be using the command line interface to
install anaconda get and perform all the
other operations like starting your
localhost server your Jabra hub so
committing and pushing all the changes
on the git repository so I would be
using command line interface throughout
this course
and I put down the length for you to
install all the windows users they can
use cygwin that comes with a collection
of open source tools and functionalities
so you can make use of that now the
second step out of the three is
installing Python and anaconda so to set
up our environment we first need to have
Python on our machine and there are
various paths and distributions
available and we need the one that works
best for data science now anaconda comes
with its cool pathum distribution which
is also the recommended one and it will
be installed along with anaconda itself
so this is the anaconda distribution
page the official documentation let's
see let's go to installation from here
all right and since we are working on
Mac OS I'll go and click on Mac OS you
will be using your own machine links so
if you're working on Windows go to
installing on Windows if you work in
Linux
we're installing on Linux so alright so
the first step I am using the command
line install so in your browser download
the command line version so I'm
downloading the Mac OS installer first
click on this and will redirect you to
the installation the Mac OS installed lo
page from here I need to install Python
3.7 version 64 bit command line
installer so I click on come online
installer now this is getting downloaded
here and we'll wait for a couple of
minutes ends so now that anaconda is
installed we are back to the
documentation and the head I'm gonna
click on keep all right so my installer
is downloaded so the next step is you
have to verify the data integrity using
this like so just copy this and paste it
in your shell and make sure that we
avoid the path where the file has begin
then downloaded so this is where my file
resides sorry this is where my file
resides and I had enter this will take
like a couple of seconds ok so we have
this the data integrity is all verified
and now we are going to install for
python 3.7 so just copy the third step
and paste it over here alright
use the bash this command and hit enter
now in order to when we do other
installation people please review the
License Agreement
enter to continue all right keep
pressing enter till you reach
at the bottom where it's going to ask
you do we accept the license terms yes
you type hit enter and hit enter to
confirm the location so it's saying that
it's going to be installing anaconda add
this path so I'm saying okay let's hit
enter so now the installation process
has started and it's going to take a
couple of minutes so why do we need
anaconda basically deer science often
requires you to work with a lot of
scientific packages like Syfy and a lot
of data manipulation packages like
pandas working with IDs and interactive
tuple notebooks and anaconda basically
comes with all these packages
pre-installed and so you have two things
when you are installing anaconda one is
Conda and one is navigator cone dies
for basically handling all such
operations using the command-line interface
and navigators for the graphical user
interface and anaconda is basically a
flawless manager both your package
manager as well as your environment
manager which keeps track of all the
packages and all the dependencies for us
so now we don't need to worry about any
of the Python package most of them come
pre-installed and if you want to install
a new package you can do that simply
using Conda
or pip I'll tell you the
command so it has asked me do you wish
to wish the Installer to initialize
anaconda three by so I say yes all right
so we have anaconda all installed for us
and it has come where the role of
packages and IDs and all such stuff so
after this once you have anaconda
installed the next thing that you will
do is
work with the different environment and
since anaconda is basically also an
environment manager so as you'll
progress you will find yourself working
on multiple applications multiple
projects so these applications will be
dependent on different versions of
Python or different versions of packages
so you'll be working with the team let's
say or a partner and you might want to
standardize the configuration so that
all of all of you are able to run the
project on different machines so in this
in that particular case you need to
create and configure different isolated
environments and conda has basically come to your rescue
which allows us to create separate
environments containing files packages
and all their dependencies that are
isolated from other environments so
let's see how we can create a new
environment so the command here is you
type in Conda create past the name of
the environment I am naming it as ves WH
and we hit enter and this is going to
create this environment MDS WH it
assigns with her sheath environment so
once this environment gets cleared and
now the environment is all set up I we
need to activate this environment in
order to use it and the command for that
is Conda activate B is WH name of your
environment just hit enter and you see
that our environment is now activated
here so all right let's see if you want
to list all the environments which exist
in your system so corner info - - a and
B s so it will give you the list of
environments that already exist in your
machine so I have base base comes
by default I have these three that I
have created on my machine so yep and in
case you want to deactivate this is the
command to deactivate your environment
so let's come to the final part which is
the third component installing it and
using it up in order to set up our
project directory so version control has
been a blessing for all the programmers
and data scientists and get is the most
widely used version control system it
permits us to keep track of our progress
we have a log of almost what we did when
we did it and allows us to go back to a
previous state of our project on the
other hand github is a cloud-based
hosting service that helps you keep
track of your progress of your source
code history so if you want to use you
know just keep track of our project
locally
you won't need github but at a certain
stage you would be working with teams
partners collaborators github becomes
necessary at that point of time and also
you can build a very strong profile to
showcase your projects and analysis on
github itself so I will be walking you
through how to create a new repository
how to set up all those things but
before all of that you would first need
to install git so this is the link I
have put it down in the description
below so make sure that you have
installed it on your machines be it Mac
OS Windows or Linux so once you have
installed it I already have it installed
on my machine so let's go ahead and
create the directory in which we are
going to put on our projects so I am
naming it as DSW h MK directory so i
let's go inside this directory that we
have created so now I am inside this DSW
H directory let's create another project
folder for this particular video let's
say environment setup alright
CD environment setup I
now inside my environment setup
directory so now let's move to get up
here I'm going to start a project this
will redirect us to the post recreation
page
you name your repository let's say
environment setup setting environment
all right let's hit create repository so
this will basically create a repository
for us and yep we're here we are so we
have these three options and create a
new repository on the command line so
this is what we are going to use so
let's copy the URL this HTTP link at the
post free link so here I am inside my
project folder so first thing that you
need to do is the first step which is
you create a new file and you create a
new file called readme dot MD and you
are adding this line to this file so you
hit enter and when you see when you hit
LS this is the file that has been
created for you now go to the second
step which is get in it
copy paste and then this command is
going to initialize the directory with a
git repository so we have an initialized
empty get repository alright let's go to
the next step so the file that we have
just created now we are going to add
this file once you have added this file
you have to commit all your changes so
since the file has been the new file
which has been added is the new change
so we have to commit this change this is
- M stands for message this is my
message first commit so I have hit enter
and I have my first commit of the
project done alright next we you have to
do is you have to add
this origin so basically you are
connecting your local repository to this
github repository that you have created
so now after that all your changes
whenever you are going to push them they
are going to be hosted on this cloud
platform called github on your
repository so copy this remote add
origin the repository link hit enter the
remote has been added now the last step
is get push - you origin master hit
enter we are going to push all the
changes that we have made and you see we
have got everything done it has pushed
all the changes on our master now if we
refresh repository so here we have our
readme dot MD which has this line
environment setup that we created all
right so we are all set so now let's go
back and activate our conda environment
kondeh activate disturb leverage
underscore a and V so our environment is
all ready to use activated and the first
thing that we are going to do is let's
check if you have Jupiter notebook where
we are going to do all of our work hit
Jupiter notebook and the terminal and
let's see what we get all right so this
has started a local who's server so if
you want to go you can simply so
basically this has rendered the
directory structure or whatever that we
have inside this directory so if you
want to create a new Python 3 notebook
we can click on this I'm going to walk
you through how to work with notebook in
the next video so stay tuned up till
then
so yep so we have our Jupyter notebook
now ready to work with so now that we're
all set up with our environment we are
ready to get started with our projector
and I have put down all the links in the
description below whatever I have used
throughout the course of this video so
if you found this video useful don't
forget to like the video share the video
and also make sure that you subscribe to
the channel so that you don't miss out
on all the upcoming videos on data
science I'm going to be rolling out the
next video really soon so till then stay
tuned and keep learning data science
with Harshit
