From homebrew + pip on OSX to miniconda

0 views
Skip to first unread message

hannes...@gmail.com

unread,
May 26, 2016, 1:43:48 AM5/26/16
to Anaconda - Public
I couldn't find an answer in the docs. Currently I'm using python installed via homebrew on Mac OSX El Capitan, as well as pip with many global packages installed (pandas, numpy, etc).

I'm working on a new project that depends on specific versions of many packages I already have installed globally, so this is becoming messy and I'm not sure what versions of what pip packages are being used. I'd like to start using miniconda.

Can I just install conda and start using it as per the documentation? Or do I need to uninstall my existing global packages from pip, and remove python from homebrew, and do other cleanup?

Thank you in advance.

Ilan Schnell

unread,
May 26, 2016, 1:52:41 AM5/26/16
to Anaconda
Hi,

there is no need to uninstall any already installed python, or pip when using Miniconda (or Anaconda).
You can install Miniconda into your home directory.  However, you need to prepend the Miniconda `bin` directory to your PATH environment variable, otherwise the system or homebrew python will be called when just typing `python` in the command terminal.
Are you familiar with the PATH environment variable, and with the `which` command?

- Ilan

--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.

hannes...@gmail.com

unread,
May 26, 2016, 2:26:18 AM5/26/16
to Anaconda - Public
Thank you so much for your quick reply, Ilan. It would be great if this is added to the FAQ in the documentation – or if the docs are editable on GitHub, I'd be happy to add that bit of info and submit a pull request.

After updating my PATH and restarting bash, I'm getting this output:


> source activate my_new_env

> whereis python

/usr/bin/python

miniconda2/envs/qiita    



Just to confirm my understanding: Does this mean, when the environment is active, when I use the python command to run a script, it will only use packages associated with that conda env and completely ignore any global pip packages?

Chris Barker

unread,
May 26, 2016, 12:59:49 PM5/26/16
to anaconda
On Wed, May 25, 2016 at 11:26 PM, <hannes...@gmail.com> wrote:
After updating my PATH and restarting bash, I'm getting this output:


> source activate my_new_env

> whereis python

/usr/bin/python

miniconda2/envs/qiita    



Just to confirm my understanding: Does this mean, when the environment is active, when I use the python command to run a script, it will only use packages associated with that conda env and completely ignore any global pip packages?

yup -- that is, indeed, the whole point of environemnts :-)

Note that you don't need a conda environment, either. IF you only have one set of dependencies you need to support, you can just use the root conda environment. Just make sure it's on your PATH before any other python installations.

Also note that when using Brew, you were already running "another" python install -- OS-X comes with python by default. YOU can have any number of python installs in a system, with few problems once your PATH is set right.

Unless you use PYTHONPATH environment variable -- don't do that :-)

-CHB



--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov

hannes...@gmail.com

unread,
May 26, 2016, 1:51:15 PM5/26/16
to Anaconda - Public
Ah, the reason this works is because you're PREPENDING miniconda to the $PATH variable, and thus it has highest priority. Clever!

Thanks Chris! 
Reply all
Reply to author
Forward
0 new messages