Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Installing Anaconda6:48 with Kenneth Love
Let's install Anaconda
To install Anaconda, the first thing we need to do is to go Anaconda.com or 0:00 Anaconda.org in our web browser, and then we'll go to the Download page. 0:05 And I'm gonna get the version that is appropriate for my operating system, so 0:12 I want Anaconda for macOS, because I'm on macOS. 0:17 And I want the 3.6 version, not the 2.7, and 0:21 I have a 64-bit processor, so I want the 64-bit version. 0:24 So we'll go ahead and download that. 0:30 And you'll probably get this pop up that asks you about the Cheat Sheet. 0:31 If you wanna put in your email and get the starter guide, that's fine, go for 0:35 it, I'm not gonna bother with it, though. 0:39 All right, so I can see the package is downloaded, so I'm gonna go ahead and 0:45 open that up. 0:48 And I will get an installer, 0:50 I'll move that over here. 0:54 So I am just going to go ahead and click through here. 0:58 You can see all the packages that are installed, there are a lot of them. 1:01 And you can also tell it where to install them, 1:06 it's a pretty normal installation kind of thing. 1:09 So, I am going to tell it to install it for 1:13 me, and you can see it's gonna take up a decent amount of space. 1:14 Choose Install, and then wait a little bit. 1:20 Okay, so once the installation finishes, then you can click Close. 1:24 I'm gonna tell it to Move to Trash, you don't have to do that, though. 1:28 And if you look in you operating system's Applications folder, 1:32 sorry, that's my Applications folder, not the one for the computer. 1:37 You should see a new application called Anaconda Navigator. 1:42 Let's go ahead and launch that, so 1:47 I'll double click it and give it a second to start up. 1:50 There we go, that's nicely sized. 1:56 So the Anaconda Navigator is your portal to basically everything that 1:58 Anaconda has to offer, there's a whole, whole lot of stuff in here. 2:03 And it's a really awesome tool for 2:08 kind of graphically browsing through what Anaconda has to offer. 2:09 And you can install packages, launch projects, you can do all sorts of stuff. 2:13 So let's take a bit of a look around this. 2:17 So first of all, here in the Home tab, I have some different apps that I can 2:20 launch, like, say, Jupyter Notebook, or the QtConsole, or RStudio. 2:24 This QtConsole is a pretty nice one to use, 2:28 it's a standard Python console, as we all think of it. 2:31 But it has a couple of extra features that make working in Python a little bit nicer, 2:35 let me move this over here. 2:41 So you can see this looks just like a normal QtConsole, but 2:44 you can see here that it's launched by Anaconda 4.4.0. 2:47 And it's kind of nice just because you get things like if I do, say, print. 2:50 That I've got this help text here that shows me how to use, say, print. 2:54 It will also show in-line figures, and one of the things I really like about it, 2:59 is it will let you edit multi-line statements in a nicer way. 3:04 So let's make a little function here called say_hi, 3:07 that takes a name, and we're gonna print("Hello " + name). 3:11 All right, so fairly straightforward, but I wanna actually edit that, 3:16 I don't want it to say hello, I want to say hello there. 3:20 So If I push the Up Arrow, then I get myself into the function, and 3:22 I can arrow key around, and I can type in, there. 3:26 And then I can just come to the end, and press Return. 3:32 And now if I call say_hi ("Treehouse"), 3:35 then I get, Hello there Treehouse, so that's pretty nice. 3:40 Let's go back over to the console or not, sorry, not console. 3:45 Let's go back over to the Navigator, and 3:50 let's look at this second tab here, which is the Environments tab. 3:53 Now an environment in Anaconda is somewhat similar to 3:57 a virtual environment that you might use for other Python development. 4:01 And inside here, you can create a new one, you can install packages to that new one, 4:04 you can do all that kind of stuff. 4:08 Let's go ahead and make a new one real quick, and lets create one. 4:09 So let's say that we're studying, we have a project for 4:13 butterflies, so we'll say Butterflies. 4:16 And you can see here the path it's gonna use, so it's got my home folder, 4:19 /anaconda/envs/Butterflies. 4:22 I can choose which Python version it's going to use, or 4:26 if I want it to use R, I go ahead and click Create. 4:29 And it's gonna create the environment, and you can see it's fetching Python and pip, 4:35 things like that. 4:40 And now that it's set up, these are the installed packages. 4:41 But if come over here and I choose the Not Installed option, 4:45 these are all the packages that are not yet installed. 4:48 And I could search for say, NumPy, if I check the box and 4:51 I say Apply, there we go, now it's going to install NumPy for me. 4:56 So it says it's going to install NumPy, and it requires this MKL, 5:02 if I hit Apply, Then it fetches MKL it fetches NumPy, 5:05 and then installs both of them, and now I have them available in that environment. 5:10 So now if I look at the installed packages, NumPy is there, 5:17 cuz I have the search. 5:20 But if I just look here, then there's NumPy, and 5:21 if I click on this Play button, and I choose to Open with Python, 5:23 then that will open a Python shell. 5:30 And you can see this is 3.6.2 from Continuum Analytics, 5:35 that's how I know it's part of Anaconda. 5:38 And if I was to do say, import numpy, then it works, and I have NumPy available. 5:40 So that's how you can graphically create your environments. 5:46 The Projects tab, so we'll just let that use the default there. 5:52 The Projects tab lets you set up and define an environment for an experiment, 5:56 or a project that you want to be reproducible and distributible. 6:00 Like you would send this into a Docker container or onto the Anaconda cloud. 6:03 I won't go too far into this one, since it's still in beta, and 6:08 it may change quite a bit before the final release. 6:11 The Learning tab gives you a large number of resources. 6:14 You can learn to use more about Python, Anaconda, Pandas, other related libraries. 6:18 And finally this Community tab here, it's similar to the Learning tab. 6:25 But this is a list of communities, conferences and other things that you can 6:30 use to dive deeper into Python, NumPy, SciPy, etc., with other people. 6:35 And I'd highly recommend opening up most of the material on these last two tabs, 6:39 both Learning and Community, as you get further into Anaconda and Python. 6:43
You need to sign up for Treehouse in order to download course files.Sign up