Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it ok to use the anaconda distribution for web development?

I started learning Python working on projects involving data and following tutorials advising to install the anaconda bundle, to take advantage of the other libraries coming with it.

So did I and I got confortable with it, I liked the way it manages environments.

During the last months, I have been teaching myself web development with django, flask, continuing to use the anaconda python. But most of the time I install the dependencies I need with pip install though (inside the conda environment).

I've never seen any tutorials or podcasts mentioning the conda environment as an option for developing web apps so I start to get worried. Is it for a good reason?

Everywhere its the combination of pip and virtualenv that prevail. And virtualenv isn't compatible with anaconda that has its own env management system.

My newbie question is: Will I run into problems later (dependencies management in production or deployment maybe?) using the anaconda distribution to develop my web apps?

like image 839
Yannick Avatar asked Dec 29 '17 17:12

Yannick


1 Answers

Yes. Albeit, with a few caveats. First, I don't recommend using the big Anaconda distribution. I recommend installing Miniconda(3) (link).

To set up the second caveat, it's important to figure out what part of Conda you are talking about using. Conda is two things, that is, it is has both the functionality of virtualenv (an environment manager) and pip (a package manager).

So you certainly can use Conda in place of virtualenv (an environment manager) and still use pip within that Conda environment as your package manager. Actually this is my preference. Jake VanderPlas had a good comparison of virtualenv vs Conda as an environment manager. Conda has a more limited offering of packages thus I try to keep everything as one package manager (pip) within that environment. One problem I've found with virtualenv is you can't choose any particular flavor of Python, e.g. 2.7, 3.3, 3.6, etc like you can seemlessly install that version of Python within your environment with Conda.

Here's a list of command comparisons of Conda, virtualenv, and pip if that helps clear things up a bit on how you can utilize Conda and/or virtualenv and/or pip.

like image 179
Paul Avatar answered Sep 28 '22 05:09

Paul