[PYTHON] Created an environment for Anaconda & Jupyter

  1. install

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.

  1. Test drive

A tutorial is provided so let's do it.

The content here is well summarized in the next cheat sheet.

2-1. Management of anaconda

Installation confirmation

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

Update Anaconda to the latest version.

$ conda update conda

I thought it was okay because it was just installed, but it was updated normally

2-2. Work environment management

Anaconda allows you to create and save work environments. Around here, it's similar to R.

Work environment creation

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.

2-3. Python version control

Since the role overlaps with pyenv, I only have a bad feeling. Leave it alone and proceed.

2-4. Anaconda package management

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
  1. Jupyter Notebook

Finally, I will do various things with Jypyter.

3-1. Launch Jupyter Notebook

Launch Jupyter Notebook

$ jupyter notebook

kobito.1458974303.637463.png

After that, operate here. Execute New Notebook from the upper right and Hello, world. kobito.1458974583.546858.png

You can execute cells by pressing Shift + Enter.

That's all for today. I'll do the rest next time.

Reference

  1. install

Recommended Posts

Created an environment for Anaconda & Jupyter
I created an Anaconda environment using Docker!
For beginners to build an Anaconda environment. (Memo)
Building an Anaconda environment for Python with pyenv
Build an Anaconda virtual environment
Jupyter Notebook 6.0.2 cannot be installed in the Python 2.7 environment created in Anaconda
[Python] Building an environment with Anaconda [Mac]
Build an environment for Blender built-in Python
Creating a virtual environment in an Anaconda environment
Building an environment for "Tello_Video" on Raspbian
Building an environment for "Tello_Video" on Windows
I created a Dockerfile for Django's development environment
Various commands for building an environment with Apache
Building an environment for matplotlib + cartopy on Mac
Try building an environment for MayaPython with VisualStudioCode
Error running Jupyter Notebook in Anaconda virtual environment
Building a Python environment for pyenv, pyenv-virtualenv, Anaconda (Miniconda)
Build an interactive environment for machine learning in Python
Create an Anaconda virtual environment in your project folder
Building an environment for "Tello_Video" on Mac OS X
[For beginners] Install the package in the Anaconda environment (Janome)
Building an environment for natural language processing with Python
Create an environment for MkDocs on Amazon Linux (attempted)
[Python] Django environment construction (pyenv + pyenv-virtualenv + Anaconda) for macOS
Run pandas-highcharts display_charts in an environment other than jupyter
Command line collection for using virtual environment in Anaconda
Anaconda3 environment installation procedure
Anaconda environment construction memo
Create an environment for test automation with AirtestIDE (Tips)
Python environment for projects
I built an environment for machine learning from scratch (windows10 + Anaconda + VSCode + Tensorflow + GPU version)
I created an environment for Masonite, a Python web framework similar to Laravel, with Docker!
Rebuilding an environment for machine learning with Miniconda (Windows version)
Recommendation of Jupyter Notebook, a coding environment for data scientists
Building a Jupyter Lab development environment on WSL2 using Anaconda3
Create an environment for "Deep Learning from scratch" with Docker
Creating an execution environment for Chef-Zero / Solo and SoftLayer CUI
Reflect the virtual environment created with Miniconda in Jupyter notebook
Python + Anaconda + Pycharm environment construction
Shortcut key for Jupyter notebook
Create an environment with virtualenv
Use Anaconda in pyenv environment
Install Python environment with Anaconda
Anaconda 4.4.0 Initial Settings for Windows
Development environment suitable for ArcPy
Introduced Tensorflow (Win / Anaconda environment)
Python environment construction For Mac
Anaconda3 python environment construction procedure
homebrew, pyenv, anaconda, Jupyter Notebook
Python3 environment construction (for beginners)
[Anaconda] Activate the virtual environment
[For organizing] Python development environment
Switch virtual environment with jupyter
python3.8 venv environment jupyter notebook
Ansible environment construction For Mac
Tips for importing macOS-optimized TensorFlow in an Apple M1 chip environment
Create an environment for Django x Apache x mod_wsgi with Vagrant (Ubuntu 16.04)
Create an arbitrary machine learning environment with GCP + Docker + Jupyter Lab
Learn machine learning anytime, anywhere in an on-demand Jupyter Notebook environment