Transcript for:
Django Installation Guide for macOS

hey guys welcome to my channel so in this video we're going to go over the process of installing Jango on Mac operating systems so the first thing that we need to do is to open up terminal okay we are now in the terminal and the First Command that you need to run is python or Python 3 on in my case so Python 3 and we get this message okay if you get something like this uh something like this message that we see here that's perfect and you can continue with this tutorial um this basically shows that python is installed on the system and it works just fine and we can see the python version here okay so if you get this that's perfect if you don't see something like this that that means that you need to go back and probably uh download and install last version of python okay or sometimes you may have python on your system but uh uh you need to uninstall python for some reason and then reinstall python the last version of python okay so make sure you get something like this before continuing with this tutorial okay now um now we sure that python Works let's exit python so the command you would want is exit open and close parenthesis okay we are out of python now now next thing we need to go to the directory where we want to uh create our virtual environment and install jangle okay we are currently in the root folder okay so I like to create uh a directory in my desktop so uh let's go to desktop so CD desktop we are now in desktop you can create your directory wherever you like okay uh so I'm now in desktop let's uh create a new directory for my projects for my jangle project uh let's call it uh projects you can call it whatever you like that's up to you so the command that you would run to create a new directory would be MK de and the name of your directory so projects so mkd projects and we have the new directory called projects okay so now let's CD to to this projects all right we are now in this projects directory uh next thing uh we need to create a virtual environment before installing D Jango okay and why we would why we would use these virtual environments why is that necessary so uh when we install D Jango using a virtual environment we actually create a separate space for our D Jango projects it's like having a clean room just for our project uh so where we can install j go and any other libraries without affecting other projects or the system itself all right so this helps you prevent conflicts between different versions of Jango and I would say using a virtual environment keeps our projects more organized and free from unwanted surprises okay and it's also considered uh good practice to use these virtual environments for your projects so the command that you need to create your virtual environment is Python 3 dasm VNV and finally the name of your virtual environment okay so I'm going to call it V1 but uh this is really up to you you can call it whatever you like so I call it V1 so again python 3- mvnv V1 let's run this okay and I think uh it created our virual environment so let's uh let's uh do a LS to check what we have here all right so we have a V1 here now Let's uh let's go to this V1 so CD V1 and now we are in this V1 okay we are now in the virtual environment uh now we need to activate this virtual environment so then the command that you need in know in order to activate this virtual environment is uh Source Bean forward slash activate okay great so it's activated our it activated our viritual environment and you can see this uh V1 inside this parenthesis right uh at the beginning of your command Prime uh command prompt so this uh V1 inside this parenthesis means that your virtual environment is currently activated great now now our virtual environment is active activated let's install Jango so the command that you need in order to install Django is PIP install jangle okay so so we can see that it's running some okay uh we can see that it's downloading and installing jangle for us so this may take some time all right all right great so I think uh it's successfully installed Jango for us now the way we can check that there is this command d uh Jango Dash admin so let's run this all right great so we can see this uh instructions here uh so if you run Jango admin you will get this instructions and this means that uh Jango is successfully installed on your in your virtual environment all right great okay so Jango is successfully installed now if you LS here you can see uh some f files here so we installed Jango but we haven't created any Jango projects yet okay so you can use this sub commands like uh like start project to start your first jangle projects okay so and if you were to uh deactivate this virtual environment that we created you can use this command uh you can use deactivate to uh deactivate your virtual environment okay now if I run this I can see that this uh V1 at the beginning of this command prom is not here anymore okay so your virtual environment is deactivated all right so I hope that this was helpful for you and if you like this kind of videos and if you haven't subscribed to my channel yet please hit the Subscribe button and bring the notification B so uh you don't miss the updates thank you so much for watching and I'll see you in the next [Music] video