Anaconda Tutorial - Installation and Basic Commands
Key Takeaways
Anaconda installation and basic commands, including creating and managing virtual environments, installing packages with Conda, and using pip for package management.
Full Transcript
hi everybody in this tutorial I will give you an overview of the anaconda distribution and how we can use it anaconda is a free Python distribution specifically designed for scientific computing so it's great for data science and machine learning tasks it lets you easily manage multiple virtual Python environments and simplifies package management so why do we want multiple environments because we don't want to spoil our system with too many side packages and we always want to manage the correct package versions and dependencies for our different projects so for example we can easily manage packages like numpy pandas or scikit-learn for our different projects so now i'm gonna show you how we can use anaconda and what we can do with it so first we want to install anaconda and for this we go to the official website anaconda comm slash distribution and then we can select our operating systems in my case it's a Mac and then select the Python version so I highly recommend using Python 3 then click on download and once the download is finished click on the installer and follow the instructions so I'm gonna skip this because I already installed it on my machine and then when the installation is done you can open up a terminal and type in condom - - version and this should print the Conda the currently installed Condor version if everything is correctly installed so here we can see that I have Conda installed on my machine by the way on Windows also make sure that you include the installation folder into your environment path variable so yeah so now we installed anaconda now we can start using it so we want to create a virtual environment and we can do this with conduct create minus n for name and then we give it a name for example I call the environment my n and we can also so now we can hit enter but we can go further and also specify the Python version we want so for example we could say python equals 3.7 and then we can also go further and specify some packages that we want with the initial setup so for example here i can type and numpy or anything else so in this case I will just specify the Python version and then I hit enter and then it will collect all the necessary packages and then it will ask me to proceed so I will hit enter again and then this will take a couple of seconds to download and install them and now my environment was created and now I can activate it with kondeh activate and then the name my n and depending on your machine the command could also be source activate my end so here it's Conda activate my end and then enter and now it activates this environment and we can see this because it writes the currently activated environment at the beginning so here I'm in the my ant environment and now I can work inside this environment so before we continue in this environment we can also let's talk about some other commands so we can deactivate it again of course so I can say Conda d activate and now you see at the beginning we no longer have the my F here so now it's deactivated now we can also see and every environment that we created on our machine with Conda and lists so this will list all the available environments so anaconda always comes with the base environment and then you can see that I already have another environment the PI Ange ends so yeah so here I can inspect all the different environments and of course I can also again remove the environments with Conda and remove minus n and then the name so my end so now if I hit enter this would remove the environment and all the packages that are inside these this environment so yeah I don't want to remove it now so now let's go ahead and work inside our environment so let's activate it again Conda activate my N and let me clear the window first so now we can manage different packages for example now I can install packages with Conda install and then the package name for example numpy and now it will collect all the necessary dependencies so for example it will also install numpy base or 6 and then it asks me to proceed so here I I go ahead and now it installed numpy and the necessary dependencies now I can say let me clear this again I can say Conda list this will list all the packages inside my environment so here we see that we have numpy now now we can also install multiple packages with one command so we could say Conda install for example install matplotlib and see porn and also pandas so this will install all these in packages and also we'll try to look for the necessary dependencies so now if I hit enter at first collects the packages and the dependencies then it asks me to proceed so I go ahead again this will take a couple of seconds and yeah so now it's done so again let's call Conda list to see all the packages and now we should see pandas here for example yes and also matplotlib here so it worked and now we could also search for packages so we can say Conda search pandas then it will try to search for all the different available versions so here it is listed all of them and when I want to install them I could for example also specify the version I want so I could say Conda install pandas equals and then for example 0.25 point 2 or something like that then it will try to collect the specific version now if I just want the newest version I could also update my version and say Conda update pandas so now if I hit enter it should already be the newest version so now it says yeah all requested package is already installed and yeah so I can also be installed packages of course with Conda rim oof for example numpy so this will remove numpy again and yeah that's how we can manage multiple or different packages inside our environment and sometimes Conda will not find the package you want and when it does not find the packaged and you can use or fall back to the to pit so pip is also a package management system so you could also say pip install and then a package so pip install numpy and yeah so this will usually try to find a global pip version on your machine so it's recommended to use a local version inside your environment too so for this you could say Conda install pip and once it is installed so in this case I know that it already is installed and now if you type in pip install and then some name and that it will use the pip version inside your environment so yeah so you can use pip install too and I think these are all the necessary commands that you need to manage your environment and your packages and then when you use a IDE like for example Visual Studio code or PI Chan then you see that it will easily integrate into your IDE so in my case I'm using Visual Studio code and if I open up visual studio code so for example let me go to another folder and now if I open up visual studio code then you will see that it will automatically all that it I can choose the environment I want so here I can choose the Python interpreter and here it will it also lists the anaconda environment version so here this is the my end that I just created so I can use this one and now if I run the script for example with right-click and then run Python file in terminal then it will use this environment so here in the terminal you see that it will activate the environment and then runs this main dot PI file with the Python version inside this environment so yeah so you could easily use it inside Visual Studio code and you don't have to activate it manually or deactivate it and yeah this is nice so this is how we can work with anaconda and I hope you like this tutorial so please subscribe to the channel and see you next time bye
Original Description
Get my Free NumPy Handbook:
https://www.python-engineer.com/numpybook
In this Tutorial I show you how you can install and use Anaconda. Anaconda is a free Python distribution specifically designed for scientific computing. It’ great for data science and machine learning tasks. In this video you can learn:
- Installation
- Manage multiple virtual Python environments
- Package management, e.g. install numpy, scikit-learn, pandas etc. in your environments
~~~~~~~~~~~~~~ GREAT PLUGINS FOR YOUR CODE EDITOR ~~~~~~~~~~~~~~
✅ Write cleaner code with Sourcery: https://sourcery.ai/?utm_source=youtube&utm_campaign=pythonengineer *
📓 Notebooks available on Patreon:
https://www.patreon.com/patrickloeber
⭐ Join Our Discord : https://discord.gg/FHMg9tKFSN
If you enjoyed this video, please subscribe to the channel!
Anaconda website:
https://www.anaconda.com/distribution/
You can find me here:
Website: https://www.python-engineer.com
Twitter: https://twitter.com/patloeber
GitHub: https://github.com/patrickloeber
#Python #MachineLearning
----------------------------------------------------------------------------------------------------------
* This is a sponsored link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Patrick Loeber · Patrick Loeber · 34 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
▶
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Lists in Python - Advanced Python 01 - Programming Tutorial
Patrick Loeber
Tuples in Python - Advanced Python 02 - Programming Tutorial
Patrick Loeber
Dictionaries in Python - Advanced Python 03 - Programming Tutorial
Patrick Loeber
Sets in Python - Advanced Python 04 - Programming Tutorial
Patrick Loeber
Strings in Python - Advanced Python 05 - Programming Tutorial
Patrick Loeber
Collections in Python - Advanced Python 06 - Programming Tutorial
Patrick Loeber
Itertools in Python - Advanced Python 07 - Programming Tutorial
Patrick Loeber
Lambda in Python - Advanced Python 08 - Programming Tutorial - Map Filter Reduce
Patrick Loeber
Exceptions in Python - Advanced Python 09 - Programming Tutorial
Patrick Loeber
Logging in Python - Advanced Python 10 - Programming Tutorial
Patrick Loeber
JSON in Python - Advanced Python 11 - Programming Tutorial
Patrick Loeber
Random Numbers in Python - Advanced Python 12 - Programming Tutorial
Patrick Loeber
Decorators in Python - Advanced Python 13 - Programming Tutorial
Patrick Loeber
Generators in Python - Advanced Python 14 - Programming Tutorial
Patrick Loeber
Threading vs Multiprocessing in Python - Advanced Python 15 - Programming Tutorial
Patrick Loeber
Threading in Python - Advanced Python 16 - Programming Tutorial
Patrick Loeber
Multiprocessing in Python - Advanced Python 17 - Programming Tutorial
Patrick Loeber
Function arguments in detail - Advanced Python 18 - Programming Tutorial
Patrick Loeber
The asterisk (*) operator in Python - Advanced Python 19 - Programming Tutorial
Patrick Loeber
Shallow vs Deep Copying in Python - Advanced Python 20 - Programming Tutorial
Patrick Loeber
Context Managers in Python - Advanced Python 21 - Programming Tutorial
Patrick Loeber
KNN (K Nearest Neighbors) in Python - Machine Learning From Scratch 01 - Python Tutorial
Patrick Loeber
Linear Regression in Python - Machine Learning From Scratch 02 - Python Tutorial
Patrick Loeber
Logistic Regression in Python - Machine Learning From Scratch 03 - Python Tutorial
Patrick Loeber
Linear and Logistic Regression in 60 lines of Python - Machine Learning From Scratch 04
Patrick Loeber
Naive Bayes in Python - Machine Learning From Scratch 05 - Python Tutorial
Patrick Loeber
Perceptron in Python - Machine Learning From Scratch 06 - Python Tutorial
Patrick Loeber
SVM (Support Vector Machine) in Python - Machine Learning From Scratch 07 - Python Tutorial
Patrick Loeber
Decision Tree in Python Part 1/2 - Machine Learning From Scratch 08 - Python Tutorial
Patrick Loeber
Decision Tree in Python Part 2/2 - Machine Learning From Scratch 09 - Python Tutorial
Patrick Loeber
Random Forest in Python - Machine Learning From Scratch 10 - Python Tutorial
Patrick Loeber
PCA (Principal Component Analysis) in Python - Machine Learning From Scratch 11 - Python Tutorial
Patrick Loeber
K-Means Clustering in Python - Machine Learning From Scratch 12 - Python Tutorial
Patrick Loeber
Anaconda Tutorial - Installation and Basic Commands
Patrick Loeber
PyTorch Tutorial 01 - Installation
Patrick Loeber
PyTorch Tutorial 02 - Tensor Basics
Patrick Loeber
PyTorch Tutorial 03 - Gradient Calculation With Autograd
Patrick Loeber
PyTorch Tutorial 04 - Backpropagation - Theory With Example
Patrick Loeber
PyTorch Tutorial 05 - Gradient Descent with Autograd and Backpropagation
Patrick Loeber
PyTorch Tutorial 06 - Training Pipeline: Model, Loss, and Optimizer
Patrick Loeber
PyTorch Tutorial 07 - Linear Regression
Patrick Loeber
PyTorch Tutorial 08 - Logistic Regression
Patrick Loeber
PyTorch Tutorial 09 - Dataset and DataLoader - Batch Training
Patrick Loeber
PyTorch Tutorial 10 - Dataset Transforms
Patrick Loeber
Download Images With Python Automatically - Python Web Scraping Tutorial
Patrick Loeber
PyTorch Tutorial 11 - Softmax and Cross Entropy
Patrick Loeber
Select Movies with Python - Web Scraping Tutorial
Patrick Loeber
PyTorch Tutorial 12 - Activation Functions
Patrick Loeber
List Comprehension in Python - A Python Feature You MUST KNOW - Python Tutorial
Patrick Loeber
PyTorch Tutorial 13 - Feed-Forward Neural Network
Patrick Loeber
How To Add A Progress Bar In Python With Just One Line - Python Tutorial
Patrick Loeber
PyTorch Tutorial 14 - Convolutional Neural Network (CNN)
Patrick Loeber
The Walrus Operator - New in Python 3.8 - Python Tutorial
Patrick Loeber
PyTorch Tutorial 15 - Transfer Learning
Patrick Loeber
YouTube Data API Tutorial with Python - Analyze Channel Statistics - Part 1
Patrick Loeber
YouTube Data API Tutorial with Python - Find Channel Videos - Part 2
Patrick Loeber
YouTube Data API Tutorial with Python - Get Video Statistics - Part 3
Patrick Loeber
YouTube Data API Tutorial with Python - Analyze the Data - Part 4
Patrick Loeber
AdaBoost in Python - Machine Learning From Scratch 13 - Python Tutorial
Patrick Loeber
Ultimate FREE Study Guide for Machine Learning and Deep Learning
Patrick Loeber
More on: Tool Use & Function Calling
View skill →
🎓
Tutor Explanation
DeepCamp AI