Okay now I know you've been through a lot and this kind of diagram here can seem very confusing to begin
with.
And don't you worry.
It took me a few times too to really understand what was going on here.
And as well as this set up here.
Right.
So you've got your computer you probably you probably understand that but this this if you've never
worked on a machine learning project before this might seem a little out of whack.
You got a project following a data you got it an environment kinda helps you create this environment
and within that environment you have different data science and machine learning tools.
Well what we're going to do in this lecture and this is for Mac OS by the way.
So if you're using a Windows computer you might want to look at the other version of this lecture which
goes through the same steps.
But what we're going to do in this section of this lecture.
And bear with me because it is this is a little bit of an involved process but we're gonna work through
it together.
There's documentation in the resources section that will help you along if you get stuck.
But don't worry this kind of concept takes a while to get it first but once you get it you'll start
to realize okay I see where it's valuable and you'll be able to use it throughout your data science
and machine learning career.
Now first of all we have your computer what we're going to do is download mini conduct along with Conda
and then use Conda to create an environment which contains some of these tools.
So this is what we'll do.
Well download many conduct which condo will come with we'll create a project folder and then we'll create
an example environment like this.
And what we can use this environment for is because there's tools in here for Data Science and machine
learning we can use it for our future projects.
This lecture kind of sets up the the whole entire rest of the course.
So once we have these environments set up we can start to work on projects get hands on start working
with data stop building machine learning models.
But setting up the right foundation is very So in saying that I've developed a little flowchart here
that again this link will be in the resources section of just some steps of what we're going to do with
Anaconda mini Condor Anaconda.
And don't worry we're not going to go through this while we actually will go through this step by step.
But for now I'll let you have a look at this on your own.
But these are the steps we're going to take download many conduct.
Let me zoom in download mini Condor install it to your computer test the installation by a terminal
create a project folder and change into it.
So this project folder is kind of like the workflow that we're going to be setting up for each of the
projects.
They'll each have their own project create a custom environment within the project folder.
Now an environment remember is a collection of packages or tools that we use for data science projects.
We're going to activate our new environment and then we're going to load up a Jupiter notebook which
is one of the tools.
Don't worry if you don't.
Not sure did you open notebook is we'll look into that in a second but Jupiter notebook is one of the
tools we use most often for data science and machine learning all right.
So the first step is to download many conduct and what we're going to do.
There's a link here in this flowchart but I'll just show you how you'd find it.
So many Conda download we open up a browser so we go to many conduct.
Now remember we're using mini Condor because it's about 10 times less space then than Anaconda now because
I'm using Mac OS I'm going to download the mac version.
Want to download the latest version because Python two point seven is Python 2.0 anything is getting
phased out as of 2020.
So remember if you're on Windows you might want to look at the Windows version of this lecture.
But if you're on Mac OS These are the steps for you.
So download this the P.K. G version.
Just trust me when I say the peak version download that what that's gonna do is gonna download to our
download section of the computer.
It doesn't take too long so we'll just wait for that to happen beautiful once that's finished we can
open it up this is gonna open up the mini Condo Three installer so you'll be guided through the necessary
steps to install this software.
Beautiful.
We're going to walk through these click agree.
Choose insulation now.
This is the default here right.
Install for me only you want to click on this one as well.
Installing this software requires one hundred ninety five megabytes of space so Roomba Anaconda even
though it's got the anaconda logo here.
You want to have it pay attention up here.
Many Condo Three.
So this is taking up Anaconda is gonna take up about three gigabytes.
This takes up about two hundred megabytes which is fine.
And now installing mini conduct is gonna come with it.
Some of the foundational tools that we need to get started with data science and machine learning.
Remember many countries like data scientists workbench so could continue install Excellent.
So after a few seconds don't actually take too long.
It'll automatically change to this little window here where it says the installation was completed successfully.
Beautiful we can close that now move to Ben.
So what have we actually done.
What we've done is we go to our computer and we've just done this step.
We've installed many conduct plus conduct and remember many condos going to come along with something
like python which is what we need to use these packages all of these packages are written in Python
code.
Now what we can do is we're going to set up this little workflow and go to our computer.
We're going to set up a project folder and then we're going to use Conda which came with many Conda
to create an environment.
So let's do that now if you're on a Mac you do this through terminal so I'm going to open up terminal
and I'll make this a bit bigger so we can zoom in.
Now if you've never experienced this before.
What this what terminal does is it essentially lets you type in commands that's going to tell your computer
to do something and that's what we want.
We want to tell our computer to go hey create this project folder and then we'll use Conda to create
this environment and you can do that with commands in the command line which is where we are now.
As I just said you may hear this referred to as bash command line terminal.
If you're on Windows might be something else but if you ever hear those words terminal bash command
line it's probably within the terminal app on Mac.
So remember you can find that by going terminal now before installing mini conduct.
This wouldn't have been here but because we have installed many Conda we've now got a little thing here
called base and what these brackets are at the start of your name you see.
This is my Macbook Pro and I mean my user account.
Daniel what this means is where we're currently in the base environment when we download mini conduct
to our computer it's going to set up a base environment.
Now this base environment comes with the default tools but we want to create our own custom environment
within our own custom project folder.
So how would we do that.
Well first of all we're going to change directory to the desktop and we can do that by pressing see
the desktop where CB means change directory.
And if you're wondering what directory is it's kind of like a folder.
So if we look in finder and I go to Daniel and we just zoom in on that for you to so this is where we
are now.
Daniel.
And what I want to do is change to the desktop so I'll change to here.
And we're going to create a folder on the desktop called sample project and this will be just an example
of how we create a project folder and an environment within that project folder so that we can we can
set ourselves up for the future for each project we go through in this course will create a new project
exactly like this.
So we're going to change the desktop now to create a folder.
We can do make a call sample project where M.K. D.A. R stands for make directory.
So if we hit enter while we do that we should be able to see if we hit L S which stands for list which
means list all the files which are on the desktop.
It says M.L. course in sample project.
And let's go back to the desktop and find out you can see sample project was created today at 121 P.M.
and there's M.L. course.
So by the end of this course you'll have maybe a sample project folder to begin with through this lecture
and then probably three or four others or depending on how many projects there are you'll have a folder
for each project that we work on.
And remember we've done step one here.
We've got our project folder.
This is what we've just created your computer downloaded mini Conda.
We haven't used many Conda yet but we've created this project forward a sample project.
Now we're going to use Conda to create an environment which contains the machine learning and data science
tools that we need.
So let's go back to terminal.
This is where we can use Condor again.
So we're going to change directory into our sample project with seed a sample project.
Now we're inside sample project and if we hit less there's gonna be nothing in here.
Go back to find out nothing in here which makes sense right.
Because it's a brand new folder now to create a sample or to create an environment you can use the command
cleaned up create.
And in our case we're going to we're going to use specifically the con to create prefix dot slash m.
Don't worry I'll step through this in a second pandas known pi top Web site.
Caitlin you might be looking at this guy and holy hell.
Daniel there's a lot of commands there and a lot of these names don't even make sense to me.
And there's what is even going on here.
Well great question because it took me a it took me a while to get around this as well.
So in a nutshell what is this saying we got kinda create so conduct create environment and prefix and
what is this even saying kinda create is just basically the introduction to any time you want to create
one of these environments you'll type conduct create it saying conduct your querying your personal assistant
going Hey I want to create something now that's something in our case has a prefix this dot end means
that we're gonna use the prefix of the current folder to be at the start of this this environment folder
that we're going to create and then these pandas num pi map plot label psychic learn other tools or
packages we want to put into our environment.
Now that was a quick overview of this line of code and we could unpack it more but most often it's important
to just try run the code and see what happens.
So let's do that now what's gonna happen is that what we've just done see a list here I'm sure you want
what we've just done so here's our line of code come to create prefix dot slash and pandas num pi Maple
Leaf socket line beautiful now environment location C where I said that that was the prefix.
So we've got prefix then Don this is what I mean that means it's gonna use the prefix of this sample
project folder or the path the file path at the front of this end folder to create another M folder
inside the sample project and using and now Daniel is you've lost me Don't worry when I first figured
out this went through this workflows like like what the hell is going on there is just we've got slashes
and folders and everything and everything's everywhere but after doing this a few times it'll start
to make sense and you realize the value in having a setup like this.
So this is saying that our environment location remember this is what we're creating environment is
going to be at users slash Daniel on the desktop it's in our folder sample project now this name might
change depending on the project we're working on and it's gonna be and it's called End end is short
for environment it's like one of those shorthand ways of typing something like C D is for change directory
you'll see this very common commonly throughout your your data science in machine learning career my
environment might be shortened to end and now Condor is telling us we're going to add slash update these
packages in there why these ones.
Well because we've typed them pandas known pi mapped properly psychic line now you might be thinking
Daniel why did you choose these.
Well let's go over here we'll zoom in look here this is the environment we want to create with some
of these tools there's map plot there's pandas there cyclone and there's no pi so let's go back to the
terminal and we scroll down com is gonna tell us a few things.
So the following packages will be downloaded the following new packages will be installed.
Yep.
And so this is saying num pi is gonna be installed Panda's gonna be installed.
But remember how Conda is is our personal assistant even though we've only typed in four packages for
tools Matlock lib num pi panders psychic loan Condor is our assistant and these these are standalone
packages on themselves but they also depend on other code so because condoms our personal assistant
it's gonna go Hey RC internet what do I need to do to run these and then condoms is gonna go and grab
all of these extra things for us automatically we're going to say yes thank you conduct.
Please proceed.
And so now what's going to happen is going to download from the Internet and extract different packages
extract just means similar to how we installed mini condom extract just means it's going to download
it and go through the install steps for us.
Now this is gonna take a few seconds because it's gonna go through Panda's num pi Matt pop lib and socket
line we'll just wait till that completes
excellent.
So that took a few seconds to download a few things from the Internet.
But now what have we just done.
Well preparing transaction done verifying transaction done executing transactions done beautiful.
Now to activate this environment.
Use this as a message from conduct conduct.
Activate users slash Daniel slash Dex top slash sample project slash EMD.
OK so if we go back into the sample project folder we can see here.
Now we've gone env folder.
So what we've done we go back to our presentation we look here we've created a project folder called
sample data.
Now we've created an environment folder called M which contains Jupiter.
I'm sorry we haven't installed Jupiter yet.
That's a little spoiler for what's coming out with pandas Matt plot and psychic line thanks to conduct.
So we're going to pay attention to what Conda says let's run this code to activate and now I like to
type things and instead of copying and pasting because it gets gets me used to typing these different
commands and you will get to you might see days and think oh my goodness is this much but don't worry
as I said we're not we're not in it for the easy thing we're in it to do things right and get and make
practical machine learning solutions and this is part of it.
So you might want to write this one down.
This your special activate might be similar to mine might have your name here so you can use it in the
future.
Now once we've written it down we're going to hit enter.
So what you'll see change here is look we've gone from base to now uses Daniel desktop sample project
and now this section here is the M prompt.
Remember that's the active environment.
So if we go conduct and list which is going to say hey conduct list the environments that we have.
We've got base and we've got the M folder in our sample project.
Now the star indicates which one is active which makes sense because this one is the same as this one.
Okay now we've set up an environment with some tools that we need.
What we're going to do is start up a Jupiter notebook and try to import the tools that we need.
Remember importing in Python is like saying hey Python going grab these tools I need to use them.