Skip to content

Instantly share code, notes, and snippets.

@namoopsoo
Last active December 28, 2017 18:36
Show Gist options
  • Save namoopsoo/6bf661945d751d6cb9a2ccf4cd961fbd to your computer and use it in GitHub Desktop.
Save namoopsoo/6bf661945d751d6cb9a2ccf4cd961fbd to your computer and use it in GitHub Desktop.
conda notes

miniconda notes cheat sheet

  • list environments
conda env list
  • new env
conda create --name myenv

  • switch to env named myenv
source activate myenv
  • viewing env packages
# current env
conda list

# some other env
conda list -n myenv
  • search...
conda search scipy
  • install
# install latest
conda install scipy

# specific version
conda install scipy=0.15.0

strange issue cant activate conda env... 2017-12-28

$ conda create --name blogplt
Fetching package metadata ...........
Solving package specifications: 
Package plan for installation in environment /usr/local/miniconda3/envs/blogplt:

Proceed ([y]/n)? 

#
# To activate this environment, use:
# > source activate blogplt
#
# To deactivate an active environment, use:
# > source deactivate
#

$ source activate blogplt
/usr/local/Cellar/pyenv/1.0.1/libexec/pyenv-which: line 44: command: -b: invalid option
command: usage: command [-pVv] command [arg ...]
pyenv: -bash: command not found

[Process completed]

  • something tells me this might be because the pyenv activate is getting used?
$ wc /usr/local/miniconda3/bin/activate 
     125     483    3802 /usr/local/miniconda3/bin/activate
$ less /usr/local/miniconda3/bin/activate 
$ which activate
/Users/michal/.pyenv/shims/activate
$ 
  • Going to try to modify the PATH...
$ which activate
/Users/michal/.pyenv/shims/activate
$ echo $PATH
/Users/michal/.pyenv/shims:/usr/local/miniconda3/bin:/Users/michal/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin
$ export PATH=/usr/local/miniconda3/bin:/Users/michal/.pyenv/shims:/Users/michal/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin
$ 
$ which activate
/usr/local/miniconda3/bin/activate
$ source activate blogplt
(blogplt) $
  • Nice! That ^ worked. Just need to be aware of the PATH when deciding which VirtualEnv System to use ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment