Install Homebrew and execute the following
$ brew install pyenv
$ pyenv install anaconda3-2.5.0
There seems to be a GUI installer, but I haven't used it. There is also a procedure when using the GUI installer.
A tutorial is provided so let's do it.
The content here is well summarized in the next cheat sheet.
Issue the version and confirm the installation
$ conda --version
The version should come out, but not
pyenv: conda: command not found
The `conda' command exists in these Python versions:
anaconda3-2.5.0
This is because I installed it with Pyenv and not Global
Create a working folder and use pyenv to install anaconda there.
$ pyenv local anaconda3-2.5.0
$ conda --version
conda 3.19.1
This time it was done.
Update Anaconda to the latest version.
$ conda update conda
I thought it was okay because it was just installed, but it was updated normally
Anaconda allows you to create and save work environments. Around here, it's similar to R.
Prepare an environment named Snowflakes for Biopython. The name follows the tutorial.
$ conda create --name snowflakes biopython
The biopython download and setup will begin and you will see the following message:
#
# To activate this environment, use:
# $ source activate snowflakes
#
# To deactivate this environment, use:
# $ source deactivate
#
Try to enable it immediately.
$ source activate snowflakes
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
pyenv: -bash: command not found
[The process is complete]
I couldn't understand what happened, so I left it and proceeded.
Since the role overlaps with pyenv, I only have a bad feeling. Leave it alone and proceed.
Show list of installable packages
$ conda list
Search for packages (install beautifulsoup4 here)
$ conda search beautifulsoup4
Install (beautifulsoup4 is already installed so nothing happens)
$ conda install beautifulsoup4
Uninstall
$ conda remove beautifulsoup4
Finally, I will do various things with Jypyter.
Launch Jupyter Notebook
$ jupyter notebook
After that, operate here. Execute New Notebook from the upper right and Hello, world.
You can execute cells by pressing Shift + Enter.
That's all for today. I'll do the rest next time.
Reference
Install all Python analysis environments in Anaconda-TASK NOTES
Installing and getting started with Jupyter Notebook (IPython)-TASK NOTES
Recommended Posts