[PYTHON] Use Miniconda

Miniconda Lightweight version of Anaconda. While Anaconda includes many libraries and IDEs, Miniconda is limited to conda, Python, and the minimum required libraries.

What is good

** Lighter than Anaconda ** At the time of installation, Anaconda is included, so it will be about several GB. In that respect, Miniconda contains only the minimum required, so it only needs a few hundred MB.

** Can use conda ** conda is a tool that allows you to manage Python packages and version control of Python itself. When building an environment using pip, where pip + pyenv is needed, only conda is needed. Especially on MacOS, building a Python environment is easy to get stuck in consideration of the default Python, so it is easy to cover with conda alone.

** The name Miniconda is cool ** I feel that conda is cooler than pip, and Miniconda is cooler than Anaconda. It's just a sound.

How to use

Install using Intora from https://docs.conda.io/en/latest/miniconda.html from the official Miniconda site.

Create a virtual environment

Create a virtual environment using conda.

conda create -n py36 python=3.6
conda activate py36

By doing so, a virtual environment py36 of Python3.6 is created, and you can switch to that environment with activate.

At this time, they kindly add (py36) $ and the environment name at the beginning of the prompt. If you don't need it

conda config --set changeps1 False
source ~/.bash_profile

By doing so, it will be written to .condarc and will not be displayed.

How to get out of the virtual environment

conda deactivate

Will return to the default base.

Add library

The library can be added with the following command.

conda install pandas

If you can't find the library on the default channel, you can also search for it with conda-forge.

conda search -c conda-forge pixiedust
conda install -c conda-forge pixiedust

If you can't find it by default, you'll want to use pip, but you want to avoid using conda and pip together as much as possible. If you can't find it in conda-forge, take a look at Anaconda Cloud.

reference

Anaconda Official Installation Guide https://conda.io/projects/conda/en/latest/user-guide/install/macos.html Anaconda Cloud https://anaconda.org/

Recommended Posts

Use Miniconda
Use pycscope
Use collections.Counter
Use: Django-MySQL
Use Pygments.rb
Use Numpy
use pandas-ply
Use GitPython
Use Invariant TSC
Why use linux
[C] Use qsort ()
Let's use pytube
Use JIRA API
Use weak references
Use django-debug-toolbar non-locally
Use combinatorial optimization
use go module