Install Python 3, Atom, NetworkX for Mac OS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to show you how to install all the components that you need to do network analysis using python and atom so from wtclass use the link provided to get to the python download page or just look for download python and you're going to want to download python 3.7 mac comes pre-installed with 2.7 but we're going to want to use 3.7 so we'll have to download it here and we'll also have to make a couple of adjustments if your mac does already have version 2 on it but i'll show you how to do those as we go along so go ahead and download it and then run the installer from here you're just going to hit continue a few times i'll give you some information about what's being installed python 3.7 and its various components go ahead and click continue and continue again and continue one more time and agree to the license agreement and then hit install from here the installation will take place it might take a little bit of time but it shouldn't take that long from here what we're going to do is go to applications and we're going to open up the utilities folder and then what we're going to do is open up the terminal so that we can test to see if python 3 was properly installed so go ahead and double click on the terminal to run it and from here just type in python3 no space and hit enter and if you get the following then it's working properly if not you'll have to double check your install and if you really get stuck just let me know and i can see what i can do to help you the next thing we're going to do is install network x using pip so type pip 3 install network x and hit enter and i already installed it so you can see this message but ideally it will go to the internet and get the packages that it needs to install network x if you have problems with this step again just let me know next we're going to pip 3 install matplotlibe so that's m-a-t-p-l-o-t-l-i-b and hit enter and you'll see that it goes out and gets all the components that it needs this is the message you should see if it worked properly again if something doesn't work just let me know and i can see what i can do to help you the next thing we're going to do is install adam so go to the link provided or just atom.io and click the download button it should say macos and then run the atom installer now you're welcome to use any ide that you like if you have experience with programming but i'm going to be showing the use of atom in class from here we're going to install a couple other packages i know lots of packages to install first of all if you ever lose the welcome guide just go back to help and choose welcome guide and it will show back up so you can grab that installer from here we're going to click on install a package and i've provided a list of the ones that you'll need on wtclass click open installer and the first one we're going to look for is called script so look for script and then click install and you'll do this for each name of each package you'll just look for it and then hit install so there are several of them to install including script and build python so when you do build python it will ask you to install some dependencies so just go ahead and say yes on those build python will be really important to make sure that everything runs properly and once everything's finished you'll have green message that the different packages that you needed were installed don't worry about that error that i have there it shouldn't apply to you so from here we're going to go ahead and test to see if it works so you may already have a file open called untitled and you can use that if you like but just to show you how to open up a new file we'll go to file new file and then from here we'll save it so i'll just do save as make sure that you know where you're putting it and we're going to call it test dot py make sure you have the dot py after it that will indicate that it is a python file go ahead and save it and now we're going to run a couple things in order to test to see that everything's working so the first thing that we're going to do is just print hello out to the console with some really simple really basic python so we're going to type print and after you type print you will open a parenthesis and you should see that it offers a closed one if it doesn't you'll have to close it by yourself but then in quotes and the quotes are really important write hello so you should have print and then in parentheses and in quotes the word hello now you'll notice that there's a blue dot there the blue dot indicates that you've added something new and that it hasn't been saved yet so i'm going to go ahead and save it using the keyboard shortcut and you'll see that that blue dot goes away now we're going to go ahead and run this to see if it works so we're going to go to packages and all the way down to script and then do run script you can see the keyboard shortcut there and what you should see is at the bottom it will say hello to you so congratulations if you've never worked with this before you've now run your first python program there's a couple other things that we need to make sure are working because remember we installed network x and matplotlibe at the top of the file i'm going to write import network x and then under that import matplotlib so that's m-a-t-p-l-o-t-l-i-b and i'm going to try to run it again so go back up to packages and down to script and run script again you can use the shortcut command i to run it if you're comfortable and you see we have an error here so we're going to do to fix this error is go back up to packages and down to script and we're going to go to configure script and from here we're going to do is under command we're going to tell it to use python 3 instead of python 2. so in under command we're going to type python3 no space hit run and you can see that now it says hello again with no errors if you want to double check just run it again using keyboard shortcut or otherwise but make sure you have python 3 in there and everything should work fine at that point if at any point you have a lot of trouble just let me know as soon as you can and i will do what i can to get it fixed screenshots are extremely helpful so make sure that you do take a screenshot and send it to me so i can help you figure out what's going on but you should now be ready to do some network analysis in python using atom
Info
Channel: Katherine Carl, PhD
Views: 381
Rating: 5 out of 5
Keywords:
Id: 7cB1y8JnuwE
Channel Id: undefined
Length: 9min 12sec (552 seconds)
Published: Sat Jan 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.