Python Tutorial: Anaconda – Installation and Using Conda

Hey there. How’s [it] going everybody in this video? We’ll be learning how to get started with Anaconda by continuum analytics now if you don’t know what Anaconda is it is a data science platform that comes with a lot of stuff right out of The box so it comes with a python Distribution a package manager called conda a way to manage environments and a lot of other Libraries and packages pre-installed now these packages are usually related to data science So it comes with things like numpy [Sci] [Pi] [jupiter] Notebooks and things like that now the number one question [people] usually have when they first hear about something like Anaconda is why would you need it? So what benefit you get from Anaconda as opposed to just installing these packages through pip or something like that Well, you shouldn’t feel obligated to use Anaconda. It’s really just an option that some people prefer So if you’re getting along, just fine with regular python and haven’t run into any problems then there’s really no huge reason to switch But a lot of people especially those in the data science community who might not be full-time developers they find that Anaconda simplifies a lot of common problems that beginners run into and it’s also good to use in classrooms So that you know your students are all on the same page, [so] things like installing python on multiple platforms separating out different environments Dealing with not having correct privileges and getting up and running with specific packages and libraries all of those are things that Anaconda can help with so let’s go ahead and download Anaconda here, and we’ll walk through some of the features So I’m here on the anaconda download Page and if you just Google python Anaconda then this should be one of the first results, [and] you can also [Google] the company name which is continuum analytics So at the top of the download page here We can see that there [is] a link for the list of packages that comes pre-installed with Anaconda So I’m going to go [ahead] and open this up and I’m going to pull up python 3.5 now if we scroll down here then you can see that it comes with a lot of stuff right out of the box So all those packages can take up a lot of space now If hard drive space is an issue for you And you don’t want to download all those packages Then they do offer a download here called mini conda and mini Conda is a small bootstrap version that comes with their python Distribution essential packages and conda and we’ll talk about Conda in just a second but we’re going to go ahead and download the entire thing so that’s going to include all of the packages that it comes pre-installed with So the download is pretty straightforward, so I’m going to download this for my mac But if you’re on a windows or a linux machine, and you can just choose one of those for your operating system So I’m just going to choose os x here and then I’m going to download this graphical installer So I’m going to go ahead and cancel out of this here, and then I’ll just wait for this download to finish [ok] so once that is downloaded. Let’s go ahead and open that [up] and run through the installer now We’re pretty much [just] going to be clicking through and accepting defaults here So I’m going to go ahead and agree [to] these and I’m going to stall only for me And I’m going to leave the default location and so now I’m just going to fast forward until this is finished installing Ok so now that that download is finished [I’m] just going to go ahead and close down my browser here and pull up my terminal okay? So when we install it anaconda, [it] should have automatically added that to our path So to test this we can just go ahead and type in python now If everything installed correctly and we should have a python version 3 here and you can see that It’s using this anaconda distribution, and if you install the full version of Anaconda [then] we should be able to import certain packages that were included with that download so I should just be able to type in import numpy and run that and you can see that that didn’t give us an error so that package does exist and just To test that further let’s go ahead and also import matplotlib and see if that works so you can see that that worked also So we already have a couple of packages here ok so now let’s just go ahead and exit out [of] python here And now I’m just going to go ahead and clear my screen. So that’s all there is to installing Anaconda and depending on what kind of system You’re on a lot of people find that kind of installation of python much easier than doing it manually Especially whenever you get a lot of popular packages out of the box now if you do need to add more packages We still have pip which most of you are probably familiar with and if you’d like to learn more about pip then I do have a separate video on that, but if I go ahead and type in pip list Then you can see that it lists out all [of] the packages that came pre-installed with Anaconda Now Anaconda also comes with its own package manager called conda And conda is useful because we can [use] it to install non python packages and dependencies So it can install some things that wouldn’t necessarily make sense with pip so we can view all the commands that we can use with Conda by running Conda – – [he’ll] Now you can see that a lot of these conda commands are similar to our pip commands, so in here We have list and search and install and things like that so let’s go ahead and clear the screen here and let’s run conda list now if we compare this to our pip list then we notice that all of these with the Py tags here are python packages that were also listed in our pip list so if you ever need to install [additional] packages Then you can try running Conda install and if for some reason you have any issues [with] using Conda or just prefer pip then you can still use pip install? to install packages now one thing that’s really interesting and useful about conda is that you can use it to manage your environments – so some of you may have seen my video on virtually envy where you can make isolated virtual environments for different projects and Conda can do that as well, and it even has a few advantages over birthday and B So let’s take a look at how we can create some virtual environments now I’m not going to go into too much depth about why we should be using virtual environments I covered that in some previous videos But basically what they’re used for is when we want to work on multiple projects these projects may use different versions of different packages and possibly even different versions of python So instead of trying to get all of our projects to conform to [our] global installations and versions We can instead just create these separate environments that have the specific packages and versions that we need So [let’s] say that we wanted to start working on a flask app now to create a new environment for this Application using conda then we can just say conda create and then I’m going to do a – – name here I’m just going to call this my app And now I’m going to go ahead and pass in some Starting packages that we want so I’m going to say flask and sql alchemy Now you have to have at least one starting package when you create a new environment with Conda But if you don’t want one then you can just pass in something like pip or python But it is required to have a but in this case We’re going to be building a flask application anyway So let’s just go ahead and pass flask and sql alchemy in as those packages And then it’s going to show you what it’s going to install and let’s just go ahead and [hit] yes Okay, so now we want to activate that new environment that we just created now This is going to be different on a Mac than on windows on windows. I believe you can just say something [like] activate my app, but on Mac This [is] actually going to be source activate my app So if I run that you can tell that we’re in our new environment here because it added the name of our environment above our Prompt right here and if I clear my screen You can see that that still stays there and once we have that environment Activated if we do a pip list then you can see that we only have our base flask and sql alchemy Packages and on Mac or linux if we want to see the path to which python we’re using then we can run which Python and you can see that the python that we’re using is now within this my app environment, okay? And once you’re done with your environment and want to deactivate it on windows. You can just say Deactivate but on Mac or linux that’s actually going to be source deactivate So we can also use content to create environments using different versions of python also? so let’s say that I wanted to create an environment for the same flask at but using python [2] 7 instead of python 3 5 Now I’m just going to bring back up that command that we used to create [that] environment, but instead I’m just going to change this name to my app 2 7 and I’m also going to pass in this keyword here [python] equals two point seven now this python doesn’t have Dashes before so it’s not an option. It’s just python [two] seven there So now I’m going to go ahead and run that and it’s going to tell us what packages It’s going to install so I’m going to go ahead and hit yes on that and once that environment is done installing Now I’m just going to go ahead and activate it. So I’m going to say Source activate my app [two] seven and now that we have [that] activated let’s go ahead and Run python Within here, and you’ll see that the version of python that we have here is python 2.7 So specifying that version when we created our environment work for luckly, okay? So now let’s just go ahead and exit out [of] python and let’s go ahead and also deactivate our Virtual environment there now one useful thing that we can do with conda is that we can view our environments that we’ve created so if I say conda ENv list and list those out then you can see that both of the environments [that] we created are there and currently this default when this root one is the one that’s activated and if you ever want to remove [an] environment Then we can just say conda remove and then we’ll pass in the name of our environment So I’ll grab this my app here and paste that in and now we need to Specify all of the packages and if we just want to delete the [entire] thing then we can just say all it’s going to ask us if we want to continue, and we can just hit yes and Now if I relist those environments, then you can see that the my app is gone So I’m going to go ahead and do that same thing for my 2.7 also say yes, and Clear the screen and if I list those out then you can see we [just] have our root and a content environment Okay, so I think that’s going to do it for this video I hope this gave you an idea of why some people would prefer using Anaconda for their python development now It’s not for everyone, but if you are someone who is working in Data science? Then it really does come with some nice packages out of the box, and you’re probably going to see it recommended on certain sites So I wanted you all to know what it was and why certain sites might suggest it so for example Jupiter notebooks are becoming very popular right now if you go to their website they recommend installing Anaconda because after the installation of Anaconda, you can just say jupiter notebook and fire one of those up And you can see that that just pops up ready to go so speaking of Jupiter Notebooks I plan on doing a tutorial on these very soon So installing Anaconda might be a good starting point if you want to follow along with those videos But it’s also real easy to install through pip So if you don’t want to install Anaconda, then you’ll still be able to follow along just fine So if anyone has any questions about what we cover in this video Then [feel] free to ask in the [comment] section below and I’ll do my best to answer those If you [enjoy] these tutorials and would like to support them then there are several ways you can do that These just ways to simply like the video and give it a thumbs up and also it’s a huge help to share these videos with anyone who you think would find them useful and if you The means you can contribute through patreon And there’s a link to that page in a description section below be sure [to] subscribe for future videos and thank you all for [watching]

100 thoughts on “Python Tutorial: Anaconda – Installation and Using Conda

  1. one question, which IDE do i manage if i using this anaconda prompt. After install all those external library, which IDE do I use to develop my program. I only have Python shell, and pip did not work really well for importing scipy, but it easy using conda. But I am still confuse where should i write my program after finish installing these library using anaconda prompt?

  2. I am new to python, I use python, if I install anaconda I think I will need to go through anaconda to access python, You knows, no one explains this they just say what it does.

  3. I honestly know absolutely nothing about python and command lines. Trying to get all of this set up for a project is giving me a ridiculous headache. Why can I only use import and not install in the anaconda prompt? and typing "conda" gives an invalid response.

  4. when I typed "python" in terminal, didn't work. after adding "PATH=$PATH:$HOME/anaconda/bin" to my .bash_profile, it worked

  5. Typing python from the command line does not give you Anaconda's python 3. It will give you MacOS's default python2.7. He set up an alias so that the command python defaults to python3. He's also using zsh instead of bash so if you are also using zsh you'll need to add [ export PATH="/Users/username/anaconda3/bin:$PATH" ] to your .zshrc file or make sure your .zshrc file is using the .bash_profile file since Anaconda already wrote that path to the .bash_profile for you.

  6. Hi
    When I type conda create –name my_app flask sqlalchemy

    It displays the following –

    Fetching package metadata…
    CondaHTTPError: HTTP 503 SERVICE UNAVILABLE for url <>
    A remote server error occured when trying to retrieve this URL.

    A 500-type error (e.g. 500, 501, 502, 503 etc.) indicates the server failed to fulfill a valid request.

    If the problem persists, consider notifying the maintainer of the remote server.

    Pls. help to resolve the above issue.

  7. i am unable to download . anaconda python 3.6 for windows , its not downloading and giving network error , can anyone share it on google drive or drop box or something :3

  8. I installed a package with pip, I can see the name of that in anaconda list .when I import it in terminal there is no error..but I can not import it on Pycharm(IDE)

    Can you pls help!

  9. I'm using sublime text to write a code using matplotlib but if I run this code on my chromebook terminal I got error like

    import matplotlib.pyplot as plt File "/usr/local/anaconda3/lib/python3.6/site-packages/matplotlib/", line 116, in <module> _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "/usr/local/conda3/lib/python3.6/site-packages/matplotlib/backends/", line 60, in pylab_setup [backend_name], 0) File "/usr/local/conda3/lib/python3.6/site-packages/matplotlib/backends/", line 16, in <module> from .backend_qt5 import (

    Can you help me to solve this Teacher. sorry for my English I'm a French student

  10. Is this recording your normal talking speed? Or did you make it go faster? If the latter, could you share the tools you use? I tried with Camtasia but it raised my voice pitch by an octave. Thank you.

  11. How to setup anaconda environment for sublime text3 ? I didn't get it how to setup python interpreter in sublime text3.

  12. I have installed anaconda in my windows 10.. i get a lot applications within anaconda.. but when i open something for example jupyter, it opens on opera.. how do i change the browser settings to run on chrome

  13. Your video was great, I sent your link to share with another You-tuber to help their viewers on installing numpy, matplotlib and etc. My installation did work the same way as the video, but my python IDLE doesn't seem to work when I try some sample import numpy or import matplotlib on the IDLE python or Sublime Text 3

    Finished in 0.2s with exit code 1]
    [shell_cmd: python -u "/Users/ricklien/Desktop/Python/"]
    [dir: /Users/ricklien/Desktop/Python]
    [path: /Users/ricklien/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]

  14. Hello Corey,
    I am using python 3.6 with PyCharm however I try to learn Python myself and I found some good web sites / your YouTube videos that interest me and would help me yet I have problems with output if that codes in PyCharm mostly no output at all … Now I'm trying to get some other IDE for Python.
    What do you think about my decision ? I'm new to programming 🙈
    Thank you

  15. Hey thanx for your video it's great but can u help me how to open python scripts with anaconda?
    I am having a hard time in knowing that1

  16. I have a problem, can somebody help me?

    I installed the anaconda navigator, but when i want to run it, a message pops and says: Error is reported:
    This application failed to start because it could not find or load the Qt platform plugin "windows" in ""

    Did somebody have this problem aswell? how did you fix it?
    I will appreciate your help, thanks!

  17. Everything I wanted to know about Anaconda in one easy tutorial. Thanks.
    I have a question though: On latest (3-5.2.0 Anaconda) Anaconda installation, it says anaconda destination folder contains 1 space, and it might not work with some packages so is it a good idea to install Anaconda at the root directory ( c: ) ?

  18. if you use Linux then :
    download the sh file from the site
    chmod +x /path/ it begins to install
    source ~/.bashrc

  19. I'm on Windows and "which python" doesn't show path. why? "which" which is not recognized as an internal or external command, operable program or batch file.

  20. Hey Corey.
    Can you please help me understand why the following is happening?

    akaadi at adismac in ~
    $ pip install virtualenv
    Collecting virtualenv
    Using cached
    Installing collected packages: virtualenv
    Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/virtualenv.pyc'
    Consider using the `–user` option or check the permissions.

    akaadi at adismac in ~
    $ pip3 install virtualenv
    Requirement already satisfied: virtualenv in ./Library/Python/3.7/lib/python/site-packages (16.0.0)

    Also, I have some packages installed in my /usr/bin directory and some in /usr/local/bin.
    why so? Sometimes I get an error in my terminal which says 'permission is not there to write to /usr/bin'
    Please guide

  21. I'm not sure if installing Anaconda and jupyter notebook were the real reason but, after doing it, the apps from Office package changed font style to italic (bold too, but less).
    As I just started learning a first programming language, I'm not very familiar with both apps. Any help?

  22. If you are using powershell in windows 10 you can use the activate deactivate functionality by using the command 'conda install in root -c pscondaenvs pscondaenvs'. I discovered this here: posted by darkdreamingdan.

  23. Hey Corey! Trying to use python to crunch some data from excel. I am using Python3.7, Sublime3 and have installed Anaconda. I am having trouble importing numpy. import numpy seems to work in my MacOs terminal, but I am getting the following error in Sublime:
    File "/Users/paulserapilio/Desktop/Phython/", line 3, in <module>
    import numpy
    ModuleNotFoundError: No module named 'numpy'

  24. Never got it to work. Too much security BS and when it finally did install it failed on a mysterious program error. Needs work – for linux, anyway. You're better off just installing Jupyter Notebook, since many of the programs Anaconda installs won't be used or you can get them yourself instead of fooling with a buggy launching shell.

  25. How do I run gedit through the Anaconda Prompt terminal?

    I just recently got into C++ and I'm trying to do my programming assignments with gedit.

  26. Thank you so much for video. I will appreciate the effort. It is really helpful. The thing I noticed is, your voice is complete matching with guy of talking thrones channel on you tube. I expect you both are same.

  27. Which environment is better to use in anaconda: JupyterLab, Jupyter Notebook or Spyder? I am little reluctant about Jupyter Notebook as it is web-based notebook. I am leanin more towards Spyder but are there any drawbacks of Spyder as compared to JupyterLab?

  28. i installed jupyter notebook but it is not connecting to python 3 kernel will you help me solving that issue

  29. Hello,
    Thank you for the tutorial, it is very helpful. I have this minor problem. I followed the steps on the video and created a venv with python 2.7. However when I activated that venv and type python, the version promped was Python 3.6.1 being the deafult python version on my mac. I double checked the version with the command "python -V" and same version 3.6.1 is shown. I check the folder created for my venv and python 2.7 was in the bin folder but still I have this error. Do you have any idea, how can I fix this?

  30. Hello hi Corey, is there any methods to use the trained model to use on directly on the internet or on the web, for example, training an image recognition or image prediction model and then, use it on a website to detect or prediction that particular piece of information accordingly trained. please reply. Thank you

  31. after installation of anaconda, it becomes default python path in Terminal. How can i change python path in Terminal?

  32. Corey Schafer I've been following many tutorials of yours and I think you are one of the best for helping me: I'm a newbie in Python but I know that for Data Science (my target in Python) the best solution should be Anaconda. However, considering its size and the fact that I'd like to start with a less complex IDE, I was thinking to start with PyCharm and installing inside it the main Data Science libraries (Numpy,Pandas,Matplotlib and even Jupyter). I know that many speak about problems in installing these libraries into PyCharm. Do you think that, as a starter, it is easy to set up a Pycharm environment with the above libraries before moving to Anaconda in the future? Or maybe this is a bad idea. Hope you can really answer me. Thanks

  33. hey Corey, what to do if the anaconda prompts refuses to connect on the internet,
    thanks for the answer!

  34. when I activate my_app, I don't get the brackets in front of my username in terminal. But I don't get any error message, do you know how to fix this?

  35. Since version 4.6 of conda, it is now:

    conda activate my_app

  36. Anaconda is garbage. Contains 1 out of 10 packages you need and you're going to need to use PIP packages alongside it anyways. Don't bother with this trash.

  37. Hi guys … if you want to use Anaconda with the Atom editor, you can do this with a simple step:

    1- Download Anaconda

    2 – Open the terminal in Atom and type this line:

    (Of course you need to edit the path name (kutaiba this is the name of my computer))

    3 – Congratulations! Now you can use anaconda with Atom
    * You must type this line every time you open atom to active anacondas

    I hope I helped you

  38. I installed anaconda3 but when I open python3 in my terminal, I cannot see that I have the anaconda distribution. Neither can I see the huge amount of packages when I type in pip list. Can anyone help please? Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *