[PYTHON] Easy usage memo of Anaconda (conda)

Introduction

I couldn't find any good material (not too much information, not too little information) about how to use Anaconda (conda command), so I summarized it.

This article assumes that you have Anaconda installed.

You can check the installation with the following command.

$ conda --version
conda 4.8.2

What is Anaconda?

A collection of Python packages for data science --Supports over 1,500 packages --Supports both GUI and command line --Can be operated using the conda command

By using Anaconda, it is possible to easily build and switch the development environment without taking time to install the library.

Reference: https://www.creativevillage.ne.jp/72837

Notes on how to use Anaconda (conda command)

1. Building a virtual environment with conda

$ conda create --name my_notebook_env python=3.7 -y

-name my_notebook_env: The name of the virtual environment. You can set whatever you like. python = 3.7: Python version used in the virtual environment -y: Automatically respond to confirmation items with yes

2. Enable virtual environment

Enable virtual environment

$ conda activate my_notebook_env

Disable virtual environment

$ conda deactivate

Delete virtual environment

$ conda remove --name my_notebook_env --all

3. Installing libraries in a virtual environment

To install pandas

$ conda install pandas

To install jupyter

$ conda install jupyter

View a list of installed libraries

$ conda list

Example: Launch jupyter notebooks in a virtual environment

Activate the virtual environment and launch jupyter notebooks

$ conda activate my_notebook_env
$ jupyter notebook

Summary

With Anaconda, you can easily build and switch development environments! Also, if the environment is damaged, you can easily rebuild it, so you can rest assured!

reference

Introducing Anaconda | Even More Python for Beginners

Recommended Posts

Easy usage memo of Anaconda (conda)
Easy usage memo of OpenStack Swift API using swiftclient
Environment construction memo of pyenv + conda
Installation and easy usage of pytest
Operation memo of Conda virtual environment
Installation of Anaconda3
RDKit usage memo
Summary of pyenv usage
Basic usage of flask-classy
Basic usage of Jinja2
Usage of Python locals ()
Basic usage of SQLAlchemy
Anaconda environment construction memo
deap usage memo (OneMax)
[Python] Correct usage of map
Super basic usage of pytest
[Personal memo] Auto-completion of bash
Basic usage of PySimple GUI
Qiita memo of my thoughts
Features of programming languages [Memo]
[Memo] Construction of cygwin environment
Convenient usage summary of Flask
Version upgrade of python Anaconda
Anaconda3 × Pycharm environment construction memo
virtualenv Basic command usage memo
(Minimal) usage of django logger
Basic usage of Pandas Summary
Sample usage of Python pickle
Basic usage of Python f-string
[Python] Correct usage of join
Index of certain pandas usage