How to switch mac terminal between anaconda and miniconda?

3.4k views Asked by At

I have installed Anaconda but the matpoltlib for python 3 did not work. So I tried to install miniconda.

$ jupyter notebook

then Jupiter notebook starts. But this message appears:

pyenv: conda: command not found 
The jupyter command exists in these Python versions:
  anaconda3-4.0.0
  miniconda3-4.1.11

How to choose miniconda?

2

There are 2 answers

6
Mike Müller On

conda environments are the way to work with different Python versions.

Create new environment:

conda create -n py35 python=3.5

activate it:

source activate py35

Now, you can install the needed libraries:

(py35) conda install matplotlib jupyter

and start the notebook server:

(py35) jupyter notebook

Using this method, you can make more environments for other Python versions or combinations of library versions.

If conda refuses to start, you can use:

which -a conda 

to see what conda commands are available.

Choose the full path you want, e.g.:

/Users/me/miniconda/bin/conda

to invoke conda.

0
David John On

I found it

$pyenv versions

In terminal this message will appear

system

anaconda3-4.0.0

miniconda3-4.1.11

next

$pyenv global miniconda3-4.1.11

$jupyter notebook