How do I set up a virtual environment with Flask using conda?

21.4k views Asked by At

I wish to set up a virtual environment that I can use to develop web applications using the Flask framework for Python (3.4.2, Mac OS). I was given the instructions on how to do that here, using the virtualenv. However, trying to follow these instructions I ran into a problem: I have Python installed via Anaconda, and upon trying:

sudo easy_install virtualenv

I am warned that I should be doing this with the already-installed conda package instead. I can't imagine that the conda way of doing things is much harder, but I also want to get bogged down with reading the documentation, because then I might not emerge back out of it again... So my question is, what's a quick way of setting up a virtual environment with Flask using Conda? And how can I then add more dependencies into this mix?

1

There are 1 answers

1
doog abides On BEST ANSWER

Your mileage may vary, but the docs tends to be where the answers are.

conda create -n my_flask_env
source activate my_flask_env 
conda install condastuff
pip install otherstuff