Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 863
Aleksey Bilogur Avatar asked Jun 13 '15 05:06

Aleksey Bilogur


People also ask

Can I use virtualenv with 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.


1 Answers

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
like image 103
doog abides Avatar answered Nov 14 '22 21:11

doog abides