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:
conda is both a package and environment manager and is language agnostic . Whereas venv creates isolated environments for Python development only, conda can create isolated environments for any language (in theory).
In other words, Conda makes it seamless to create virtual environments using different versions of Python. With Venv, we will need to use an additional tool to manage Python versions or install multiple Python versions before creating virtual environments.
VirtualEnv helps you create a Local Environment(not System wide) Specific to the Project you are working upon. Hence, As you start working on Multiple projects, your projects would have different Dependencies (e.g different Django versions) hence you would need a different virtual Environment for each Project.
It's fully recommended to use pip inside of conda. It's better to install using conda, but for any packages that don't have a conda build, it's perfectly acceptable to use pip.
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
.
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 3.0.0.0 <pip>
Short answer is, you only need conda.
Conda effectively combines the functionality of pip and virtualenv in a single package, so you do not need virtualenv if you are using conda.
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:
https://docs.conda.io/projects/conda/en/latest/commands.html#conda-vs-pip-vs-virtualenv-commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With