This post provides you a thorough description of how to install both the anaconda and python versions on your Windows computer, and how to access them individually.
β Introduction.
If you're reading this post, then you're either an ML enthusiast or an enthusiast like me to try various python distributions π .
As a python developer, there will be situations where one needs to work with more than one distributions of python. And it's known fact that accessing different distributions of python is a bit tricky and can be a hectic job for beginners. Well, after reading this post, hope you'll get a clear picture how to use both with ease.
π Requirements
- A Windows 10 operating machine.
- Python (any version).
- Anaconda Distribution Package.
That's it.
In this scenario, I'll be using latest version of Python 3.9.1, however you're free to use any version of python.
Install Anaconda Distribution
Download the latest version of Anaconda Distribution here
Make sure you have checked out Add Anaconda3 to my PATH environment variable. This provides the flexibility to access the distribution of anaconda python anywhere from the PC.
Click on Install. Hang on some time, the installation will take a while depending on your system performance.
Once installed, do a quick run of Anaconda Navigator and ensure it's running fine.
π Install Python
Download the appropriate version python exe installer from here
- Run the installer.
Click on Customize installation and make few clicks on Next till you've got this page.
Choose a custom location other than the default. In this case I've choose
D:\Python39
.Click on Install and hang on for few moments until it get installed.
π€ How to Access Anaconda & Python from cmd
?
Accessing Anaconda from cmd
:
It's actually simple to access / activate anaconda distribution.
- Open
command prompt
and use the following command to activate conda base environment.
conda activate base
Type
python
and you'll be welcomed with python from anaconda environment.
The
(base)
before the path indicates that conda environment is active.To deactivate conda environment, use the following command
conda deactivate
Well, with that you've learned how to access/activate conda environment using cmd
, let's look into accessing python environment using cmd
.
Note: Every anaconda distribution comes with base environment. Any additional virtual environments created inside anaconda can be activated using the
conda activate <envname>
Accessing Python from cmd
:
A simple thing to remember here, just make sure that you're not in conda
environment in order to access Native Python distribution.
- Just type
python
orpy
to open the python interpreter.
π₯ Install packages differently
With both the distributions installed, you have control on installing packages separately for each distribution.
- To install any package/dependency in conda environment, use the following command
conda install <packageName>
- To install any package/dependency in native python, use the following command
pip install <packageName>
That's it! β
See you in next post!π
Feel free to comment down any type of doubts/issues you've encountered. Would β€οΈ to help.
Find this insightfulπ€ Give a β€οΈ & share the knowledge with your friends.
Top comments (3)
hey fharook, it was a cool blog and working perfectly for me. Thanks for the post and keep posting bro waiting for more posts bro
Glad to here that Avinash! Kudos.ππ.
Absolutely great explanation and clear installing procedure . Thank you so much FHAROOK ,continue the good work.