2

We are currently using pip+virtualenv and install all our Python dependencies during the application build step on the CI. This requires compiling some of the packages, which contain C modules, which takes time and requires the build servers to have required system-level "development libraries" installed.

From what I understand, Anaconda can install pre-built packages allowing to skip the complication step altogether making the builds faster and not needing to have certain development packages.

Has anyone gone through pip+virtualenv to conda transition? What could be the downsides and potential problems of switching to conda for building and installing Python dependencies?

  • Python normally installs pre-built binary packages (known as 'wheels') - if you are finding it is always compiling packages that indicates a problem in your setup. Anaconda looks nice but it is a big download compared to installing just the required Python packages with pip and virtualenv. Installing system-level development libraries (e.g. build-essential on Ubuntu) is a one-time requirement and normally very easy with single apt/yum command. – RichVel Nov 27 '19 at 6:09
3

In my field (science) Anaconda is probably the most common Python distribution in use. conda is the package manager (just to be clear of the distinction).

It is difficult to find fault in conda when compared with pip+virtualenv.

The one point that I would make is that the Anaconda distribution is meant to be installed per user. If you have a Python environment that is shared across users there is no way of doing the equivalent of pip install --user with conda (but read on for a surprising solution...). Nor users can create conda environments.

So, if you are considering a single user installation go ahead and try Anaconda. It is worth a try

Note that you can use pip with Anaconda... they are not incompatible. In fact that can be quite useful in a shared installation.

I have setup a shared-user conda installation where users can install user-space packages with... pip install --user.

In a shared installation I do not see how users can create their own conda environments (conda has environments). And I bet conda+virtualenv would be a mess.

Note that conda is not Python tied: First you can have a conda installation with both Python 2 and 3 - and conda manages environments very well. But you can also have conda install Perl, R. In fact that is quite common. Our Perl interpreter is provided by Anaconda ;)

Also I suspect conda is probably stronger in Linux and Mac OSes. Windows is less well supported. For other operating systems, there are probably no packages (or they will be limited).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.