Johan Johan - 1 year ago 84
Python Question

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 Source
  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 piplike this:

wxpython-common                    <pip>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download