Best Python package manager and package for virtual environment ?

Author: neptune | 29th-May-2021 | views: 57
#Python #Anaconda #Virtualenv #Pip

In this article, I am going to tell you which package manager you should use for your python evironments either for web development or machine learning.

Everyone has different preferences when it comes to their programming environment like Virtualenv versus Anaconda. We will help you choose a better environment for you.


Pip is a python package manager it is now inbuilt with Python latest versions, If you have python then likely you have pip preinstall else follow the following command to install pip.

Commands to install pip.

For Ubuntu users.

~$ sudo apt install python3-pip

~$ pip3 --version

pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

For Windows users.

Download this file: then open cmd prompt and run the command.

~$ python

Note: For Ubuntu users (pip3) and For Windows users (pip)

Check help option

[email protected]:~$ pip3 help


  pip3 [options]


  install                     Install packages.

  download                    Download packages.

  uninstall                   Uninstall packages.

  freeze                      Output installed packages in requirements format.

  list                        List installed packages.

  show                        Show information about installed packages.

  wheel                       Build wheels from your requirements.

  debug                       Show information useful for debugging.

  help                        Show help for commands.

  many more...

Pip installs packages like NumPy, pandas, Jupiter, Django, TensorFlow and many more with their dependencies use below command to install packages.

~$ pip install library_or_package_name

Definitely, you have seen a file name requirements.txt in projects. It includes all the libraries that project uses using pip you can install all of them in one command.

~$ pip install -r requirements.txt

We need a separate virtual environment so that we can use the package manager to install packages in that isolated environment.

To take caring of this we have two different pip packages:

  1. Virtualenv

  2. Anaconda


Virtualenv is a package that will help you to create an isolated virtual environment for your project or web development or Machine learning libraries.

Let's say you are working on a web development project and at the same time you also working on the Machine Learning project. For web development, you need different packages and libraries and for your Machine learning project, you need different libraries. Virtualenv will help you manage both projects in a virtual isolated environments.

For that you need to install Virtualenv in your system. Follow the bellow commands.

There is a little difference for ubuntu and windows users.

For Ubuntu users.

Installing virtualenv

~$ pip3 install virtualenv

create a virtual environment with name venv

~$ virtualenv venv

If you want to create a virtual environment for python2.7 then specify the version of python as shown below.

~$ virtualenv -p /usr/bin/python2.7 venv

Now the time is to activate a virtual environment using the below cmd where venv is the name of your environment.

~$ source venv/bin/activate

You can also use Anaconda for creating a virtual environment.


For data science work anaconda is a great choice. Anaconda is created by Continuum Analytics, it is python distribution that comes with preinstalled data science libraries.

Anaconda comes with tools for data science and machine learning in one install. You can install Anaconda using pip and from official site conda is it package manager it will install packages and libraries.

~$ pip3 install conda

Collecting conda

  Downloading conda-4.3.16.tar.gz (299 kB)

     |███████████████████████████████▊| 296 kB 83 kB/s eta 0:00:01

So the questionaries which one you use, anaconda or Virtualenv ?. We will help you decide, actually it depends on if you are working on a project related to data science or machine learning then You should choose anaconda else virtualenv.

Still confused then meet Pyenv


It sits on top of both anaconda and virtualenv. Pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.

You will enjoy it whenever you enter your project directory then it will activate the environment automatically.

~$ cd myproject

~$ (env)/myproject

Wrap Up things

Certainely there are a lot of tools out there it's important to remember that everyone has different needs and preferences. So you must choose for yourself which one serves you better. As per my advice, if you are working on web development then go for Virtualenv else if you are working on data science-related project then go for Anaconda.

Related Blogs
Python 3.9 new amazing features ?
Author: neptune | 25th-May-2021 | views: 110
Some of the best new feature of Python 3.9 like Dict union, Type hinting with examples..
Will, AI kills developers and programmers job ?
Author: neptune | 05th-Jun-2021 | views: 47
#Python #Machine learning #AI
GPT-3’s performance has convinced that Artificial intelligence is closer or at least AI-generated code is closer than we think. It generates imaginative, insightful, deep, and even excellent content...
Python Built-in functions lambda, map, filter, reduce.
Author: neptune | 26th-May-2021 | views: 37
We are going to explore in deep some important Python build-in functions lambda,map,filter and reduce with examples..
Do you know Jupyter is now full-fledged IDE?
Author: neptune | 25th-May-2021 | views: 32
#Python #Jupyter
Jupyter is a widely used tool by Data scientists. So developers from institutions like Two Sigma, Bloomberg and convert it into IDE lets see..
How to download video from youtube using python module ?
Author: neptune | 26th-May-2021 | views: 32
We will let you know how you can easily download the Youtube high quality videos along with subtitle, thumbnail, description using python package..
What exactly you can do with Python?
Author: neptune | 29th-May-2021 | views: 32
Well, it's a tricky question to answer because there are lots of application of Python. But, I will tell you about 3 main applications of Python...
How to extract Speech from Video using Python?
Author: neptune | 25th-May-2021 | views: 29
Simple and easy way to convert video into audio then text using Google Speech Recognition API..
View More