How should I install Tornado on MAC with Anaconda previously installed

182 views
Skip to first unread message

Ron Bjork

unread,
Feb 8, 2015, 1:45:23 PM2/8/15
to python-...@googlegroups.com
I've read that a any new installation depending on Python should be done with VirtualEnv. But according to to some postings, Anaconda(which used Tornado for its notebook apps) in incompatible with virtualenv and that conda should be used instead. Not sure whether these statements are made in a context that does not pertain to my situation. I'd like to use Tornado outside Anaconda to develop REST service for a mobile app.
Can someone suggest a procedure for installing Tornado with recking my Anaconda installation?
Thanks
Ron

Matthew Brett

unread,
Feb 8, 2015, 3:01:16 PM2/8/15
to python-tornado
Hi,
Why not have a separate virtualenv for your new tornado installation?

You could have virtualenv use system python, as in:

virtualenv --python=/usr/bin/python for-tornado
. for-tornado/bin/activate

Then you can pip install the stuff you need into the virtualenv,
including tornado.

Best,

Matthew

Ron Bjork

unread,
Feb 8, 2015, 5:15:32 PM2/8/15
to python-...@googlegroups.com
Thanks for you response. That is what I had planned. But when I attempted to install the "virturalenv" app I get the following warning:

$ pip install virtualenv

WARNING: using virtualenv with Anaconda is untested and not recommended.
We suggest using the conda command to create environments instead.
For more information about creating conda environments, please see:

         http://docs.continuum.io/conda/examples/create.html

Proceed (y/n)? 

To which I reply "n" (no) . I don't want to damage my Anaconda install.

Ron

Matthew Brett

unread,
Feb 8, 2015, 6:10:37 PM2/8/15
to python-tornado
Hi,

On Sun, Feb 8, 2015 at 2:15 PM, Ron Bjork <grbt...@gmail.com> wrote:
> Thanks for you response. That is what I had planned. But when I attempted to
> install the "virturalenv" app I get the following warning:
>
> $ pip install virtualenv
>
> WARNING: using virtualenv with Anaconda is untested and not recommended.
> We suggest using the conda command to create environments instead.
> For more information about creating conda environments, please see:
>
> http://docs.continuum.io/conda/examples/create.html
>
> Proceed (y/n)?
>
> To which I reply "n" (no) . I don't want to damage my Anaconda install.

Aha. First - my guess is that the problems arise when using
virtualenvs based on the Anaconda Python - but I'm happy to be
corrected.

It that's true, then you can safely proceed and use the virtualenv
command line I gave, which specifies system Python rather than the
Anaconda Python.

If not, then you can try installing pip into system python instead,
and proceed from there:

curl -O https://bootstrap.pypa.io/get-pip.py
sudo /usr/bin/python get-pip.py
sudo /usr/local/bin/pip install virtualenv
/usr/local/bin/virtualenv --python=/usr/bin/python for-tornado
. for-tornado/bin/activate

Best,

Matthew

Ron Bjork

unread,
Feb 9, 2015, 10:51:00 AM2/9/15
to python-...@googlegroups.com
Thanks for you help!  One last question.  I have several python installations in addition to that in "/usr/bin" and "/usr/local/bin":

     /System/Library/Frameworks/Python.framework/Versions/2.7/bin
    /Library/Frameworks/Python.framework/Versions/3.4/bin
Do I need to be concerned which is used. I currently have "pip" in both Anaconda and /usr/local/bin.

Ron

Matthew Brett

unread,
Feb 9, 2015, 12:06:00 PM2/9/15
to python-tornado
Hi,

On Mon, Feb 9, 2015 at 7:51 AM, Ron Bjork <grbt...@gmail.com> wrote:
> Thanks for you help! One last question. I have several python
> installations in addition to that in "/usr/bin" and "/usr/local/bin":
>
> /System/Library/Frameworks/Python.framework/Versions/2.7/bin
> /Library/Frameworks/Python.framework/Versions/3.4/bin
> Do I need to be concerned which is used. I currently have "pip" in both
> Anaconda and /usr/local/bin.

Any non-Anaconda Python should be fine.

``head -1 /usr/local/bin/pip`` will tell you which Python that pip is using.

Cheers,

Matthew

Phyo Arkar

unread,
Feb 17, 2015, 1:57:56 PM2/17/15
to Tornado Mailing List
Anaconda's Conda package manger already have an awesome condaenv ,
which is virtualenv compatible with ananconda.
You don't need another Virtual-env for conda.

conda create -n env_name [space separated list of packages to install]
source path/to/conda/bin/activate env_name

And do whatever you want in this env.
> --
> You received this message because you are subscribed to the Google Groups "Tornado Web Server" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to python-tornad...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ron Bjork

unread,
Feb 20, 2015, 3:13:18 PM2/20/15
to python-...@googlegroups.com
Thanks. Sounds like the easiest way to go. For now I'm using the same environment and Anaconda since all the tools there are potentially needed in my server side development with Tornado. But when I need to diverge from it with differing packages, I'll remember what you posted.
Reply all
Reply to author
Forward
0 new messages