‫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 to to really understand what was going on here and as well
‫as this set up here.
‫Right.
‫So you've got your computer.
‫You've 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've got a project folder, you've got data, you've got an environment.
‫Conda 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 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 or this lecture and bear with me, because it is this is
‫a little bit of an involved process, but we're going to work through it together.
‫There's documentation in the resources section that that will help you along if you get stuck.
‫But don't worry, this kind of concept takes a while to get at 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 Conda 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 Mini Conda, which Conda will come with, will create a project folder, and then we'll
‫create an example environment like this.
‫And what we can use is 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 important.
‫So in saying that.
‫I've developed a little flow chart 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 and Condor.
‫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 Mini Condor.
‫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 Jupyter Notebook, which
‫is one of the tools.
‫Don't worry if you don't, I'm not sure what a Jupyter Notebook is.
‫We'll look into that in a second.
‫But Jupyter 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 mini 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 Mini Conda Download We open up a browser so we go to mini conduct.
‫Now, remember, we're using Mini Condor because it's about ten times less space than 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 2.7 is or Python two point 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 pcgg version.
‫Just trust me when I say the pcgg version.
‫Download that what that's going to do, it's going to 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 going to open up the mini 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 installation.
‫Now this is the default here install for me only you want to click on this one as well.
‫Installing this software requires 195 megabytes of space.
‫So remember Anaconda, even though it's got the Anaconda logo here, you want to have it pay attention
‫to up here mini kind of three.
‫So this is taking up Anaconda is going to take up about three gigabytes this takes up about 200 megabytes,
‫which is fine.
‫And now installing Mini is going to come with it.
‫Some of the foundational tools that we need to get started with data science and machine learning.
‫Remember Mini Condor is like a data scientists workbench, so continue install.
‫Excellent.
‫So after a few seconds didn'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 bin.
‫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 Mini Conda plus Conda.
‫And remember, Mini Condor is 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.
‫We've got our computer, we're going to set up a project folder, and then we're going to use Conda,
‫which came with Mini Conda to create an environment.
‫So let's do that now.
‫If you're on a mac, you can 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 to terminal now before installing mini conduct, this wouldn't
‫have been here.
‫But because we have installed Mini 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'm in
‫my user account.
‫Daniel What this means is we're currently in the base environment.
‫When we download Mini Conda 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
‫CD desktop where CD 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, let me 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, we'll create a new project exactly like this.
‫So we're going to change the desktop.
‫And now to create a folder we can do make dir call sample project where mkdir stands for make directory.
‫So if we hit enter while we do that, we should be able to see if we hit ls which stands for list,
‫which means list all the files which are on the desktop.
‫It says ML course and sample project.
‫So let's go back to the desktop in Finder.
‫You can see Sample Project was created today at 1:21 p.m. and there's ML 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 many Conda We haven't used many conda yet but we've created this project folder
‫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 Conda again.
‫So we're going to change directory into our sample project with CD sample project.
‫Now we're inside sample project and if we hit LS there's going to be nothing in here.
‫Go back to Finder.
‫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 conda 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 set through this in a second.
‫Pandas num pi map plot lib socket line.
‫And you might be looking at this going, 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've got to create so conda create environment and prefix and what is this even saying to create is
‫just basically the introduction to any time you want to create one of these environments you'll type
‫Conda created saying Conda, you're querying your personal assistant going, Hey, I want to create
‫something now that's something in our case has a prefix.
‫This dot m means that we're going to 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 nom py map plot lib cyclone are the 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 is going to happen?
‫Is that what we've just done?
‫So your list here.
‫I'll show you what what we've just done.
‫So here's our line of code to create prefixed env pandas.
‫Now apply map plot lib cyclone.
‫Beautiful.
‫Now.
‫Environment, location.
‫See where I said that was the prefix.
‫So we've got prefix then dot.
‫This is what I mean.
‫That means it's going to use the prefix of this sample project folder or the path, the file path at
‫the front of this end folder to create another Hm folder inside the sample project.
‫And you're thinking, oh Daniel is you've lost me.
‫Don't worry.
‫When I first figured out this or went through this workflow, I was like, What the hell is going on
‫there?
‫It's 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 uses slash Daniel it's 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 going to be M, it's called
‫env.
‫M is short for environment.
‫It's like one of those shorthand ways of typing something like CD is for change directory.
‫You'll see this very common commonly throughout your data science and machine learning.
‫Career might environment might be shortened to M and now Conder is telling us we're going to add slash
‫update these packages in there why these ones.
‫Well because we've typed them pandas numpy matt pop lib psychic lan.
‫Now, you might be thinking, Daniel, why did you choose these?
‫Well, let's go over here.
‫We'll zoom in and look here.
‫This is the environment we want to create with some of these tools.
‫There's map, plot, lib, there's pandas, there's cyclone and there's numpy.
‫So let's go back to the terminal and we scroll down.
‫Conda is going to tell us a few things so the following packages will be downloaded.
‫The following new packages will be installed.
‫Yep.
‫So this is saying num py is going to be installed.
‫Panda is going to be installed.
‫But remember how condor is is our personal assistant even though we've only typed in four packages for
‫tools.
‫Map Plot Lib NumPy Pandas Cyclone Condor is our assistant and these these are standalone packages on
‫themselves, but they also depend on other code.
‫So because Kondo's our personal assistant, it's going to go, hey, rc internet, what do I need to,
‫to, to run these?
‫And then Conda is going to go and grab all of these extra things for us automatically.
‫We're going to say Yes, thank you, Conda.
‫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 conda.
‫Extract just means it's going to download it and go through the install steps for us.
‫Now this is going to take a few seconds because it's going to go through pandas num py map plot lib
‫and socket learn.
‫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 transaction done.
‫Beautiful.
‫Now to activate this environment use this is a message from Conda Conda activate users slash daniel
‫slash desktop slash symbol project slash env.
‫Okay, so if we go back into the sample project folder, we can see here now we've got an m 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 ENV which contains Jupyter.
‫Sorry, we haven't installed Jupyter yet.
‫That's a little spoiler for what's coming up with pandas, map, plot lib and cyclone thanks to conduct.
‫So we're going to pay attention to what Conda says.
‫Let's run this code con to activate and now I like to type things out instead of copying and pasting
‫because it gets gets me used to typing these different commands and you will get to, you might see
‫these and think, my goodness is just so 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 M5.
‫Now this section here is the MB prompt.
‫Remember that's the active environment.
‫So if we go conduct MV list, which is going to say, hey, conda list the environments that we have.
‫We've got bass and we've got.
‫The 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 Jupyter Notebook and try to import the tools that we need.
‫Remember, importing in Python is like saying, Hey, Python, go and grab these tools.
‫I need to use them.