Does Conda replace the need for virtualenv?


I recently discovered Conda after I was having trouble installing SciPy, specifically on a Heroku app that I am developing.

With Conda you create environments, very similar to what virtualenv does. My questions are:

  1. If I use Conda will it replace the need for virtualenv? If not, how do I use the two together? Do I install virtualenv in Conda, or Conda in virtualenv?
  2. Do I still need to use pip? If so, will I still be able to install packages with pip in an isolated environment?

Answer rating: 184

  1. Conda replaces virtualenv. In my opinion it is better. It is not limited to Python but can be used for other languages too. In my experience it provides a much smoother experience, especially for scientific packages. The first time I got MayaVi properly installed on Mac was with conda.

  2. You can still use pip. In fact, conda installs pip in each new environment. It knows about pip-installed packages.

For example:

conda list

lists all installed packages in your current environment. Conda-installed packages show up like this:

sphinx_rtd_theme          0.1.7                    py35_0    defaults

and the ones installed via pip have the <pip> marker:

wxpython-common                    <pip>

Answer rating: 73

Short answer is, you only need conda.

  1. Conda effectively combines the functionality of pip and virtualenv in a single package, so you do not need virtualenv if you are using conda.

  2. You would be surprised how many packages conda supports. If it is not enough, you can use pip under conda.

Here is a link to the conda page comparing conda, pip and virtualenv:

Get Solution for free from DataCamp guru