[PYTHON] Install anaconda on Mac → Add Library

Preparation


Install pyenv

--Update homebrew and install pyenv

$ brew update
$ brew upgrade
$ brew install pyenv
$ pyenv --version ###Confirm that pyenv installation is complete

From installation of anaconda to environment construction

--Check the version of anaconda to install -- grep does not have to be done

$ pyenv install -l | grep anaconda

--Install the anaconda you want to install --Here, for the purpose of using python3.x, install the latest version of anaconda3.x at the moment.

$ pyenv install anaconda3-4.2.0
$ pyenv versions ###Confirm that anaconda installation is complete

--Enable anaconda --Set the name you want to use for the argument of --name (like alias)

$ pyenv global anaconda3-4.2.0    ###Specify the version of anaconda to use
$ conda create --name py python=3.6 anaconda    ###To be able to use the anaconda library at the end of the argument"anaconda"I will add
Fetching package metadata .......
Solving package specifications: ..........

Package plan for installation in environment ...

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    jpeg-9b                    |                0         240 KB
    libiconv-1.14              |                0         1.3 MB
    mkl-2017.0.1               |                0       110.8 MB
    curl-7.52.1                |                0         536 KB
...
    anaconda-4.3.0             |      np111py36_0           6 KB
    ------------------------------------------------------------
                                           Total:       326.8 MB

The following NEW packages will be INSTALLED:

    _license:           1.1-py36_1
    alabaster:          0.7.9-py36_0
    anaconda:           4.3.0-np111py36_0
...
    yaml:               0.1.6-0
    zlib:               1.2.8-3

Proceed ([y]/n)? y

Fetching packages ...
jpeg-9b-0.tar. 100% |#############################################################################| Time: 0:00:00   3.62 MB/s
libiconv-1.14- 100% |#############################################################################| Time: 0:00:00   4.43 MB/s
...




$ source activate py    ### --Use the name used as the argument of name as the argument of activate → The iTerm session is closed for some reason(tmux window exits)
$ python --version    ###Check if python3 is started from anaconda
Python 3.5.2 :: Anaconda 4.2.0 (x86_64)    ###If python is not started from anaconda"::"After that should not be displayed

$ python2 --version    ###For example, this time python2.x not yet installed in anaconda
Python 2.7.13
$ python2
Python 2.7.13 (default, Dec 24 2016, 20:29:00)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

$ python3 --version    ### python3.If x, start with anaconda
Python 3.5.2 :: Anaconda 4.2.0 (x86_64)
$ python
Python 3.5.2 |Anaconda 4.2.0 (x86_64)| (default, Jul  2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

--To delete the `conda create``` environment, enter a name in the argument and `conda remove```

$ conda remove --name py --all

--If you do not want to use the created anaconda environment, deactivate with the set name as an argument.

$ source deactivate py

(↓ 2017 / Jul / 22 postscript ↓)

Install the library in anaconda environment

Procedure when you want to add a library via anaconda

  1. `` `$ anaconda search -t conda [library name] ``` to search for the library you want
  2. Output the installation command with ``` $ anaconda show [library name hit by search]` ``
  3. Type the installation command output as `$ conda install --channel [path] [library name]`
  4. If you make a mistake, uninstall with ``` $ conda uninstall [library name]` ``

Example) When installing gensim additionally on anaconda

By the way, if you want to install gensim, pip___ is recommended rather than ___ anaconda. If you want to do deep learning processing, gensim installed with ___pip may be much faster than ___ (Click here for details items / 619d64d646d0385a7e01)).

Install gensim with anaconda


$ anaconda search -t conda gensim ###The gensim library that seems to have been prepared by various people is displayed
Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
     Name                      |  Version | Package Types   | Platforms
     ------------------------- |   ------ | --------------- | ---------------
     ActivisionGameScience/gensim |   0.11.1 | conda           | linux-64
                                          : Python framework for fast Vector Space Modelling
     DavidMertz/accelerate-gensim |   0.12.3 | conda           | linux-64, win-64, osx-64
     KristinDay/gensim         |   0.12.4 | conda           | osx-64
                                          : Python framework for fast Vector Space Modelling
     MickC/gensim              |   0.10.0 | conda           | linux-64, win-64
                                          : Gensim installation for Anaconda
     RahulJain/gensim          |   0.12.4 | conda           | win-64
     anaconda/gensim           |    2.2.0 | conda           | linux-ppc64le, linux-64, win-32, osx-64, linux-32, win-64
     asmeurer/gensim           |    0.8.8 | conda           | win-32, win-64, osx-64
・
・
・
     smfullman/gensim          |   0.12.1 | conda           | linux-64
                                          : Python framework for fast Vector Space Modelling
     test_org_002/gensim       | 0.13.4.1 | conda           |
     ymartel/gensim            |   0.10.3 | conda           | linux-64
                                          : Python framework for fast Vector Space Modelling
Found 21 packages
$ anaconda show anaconda/gensim ###Something like that in the output(Name judgment, Version 2.2.0 Latest, Platform compatible)Choose
Using Anaconda API: https://api.anaconda.org
Name:    gensim
Summary:
Access:  public
Package Types:  conda
Versions:
   + 0.10.0
   + 0.10.3
   + 0.12.2
   + 0.10.2
   + 0.12.1
   + 0.12.4
   + 0.13.3
   + 0.13.4.1
   + 0.13.4
   + 1.0.1
   + 2.1.0
   + 2.2.0

To install this package with conda run:
     conda install --channel https://conda.anaconda.org/anaconda gensim
$ conda install --channel https://conda.anaconda.org/anaconda gensim ###You can install it by typing the command output on the last line.
$ ###Again, we recommend installing gensim from pip.
$ conda uninstall gensim ###If you make a mistake, you can uninstall it as shown on the left.

Recommended Posts

Install anaconda on Mac → Add Library
Install module on Anaconda (Mac)
Install Python 3.7 Anaconda on MAC, but Python 2
Install opencv on Mac using Anaconda Navigator
Install anaconda on a new Mac anyway
Install Tensorflow on Mac
Install Ansible on Mac
Install Python on Mac
Install Python 3 on Mac
Install Anaconda on Windows 10
Install Python 3.4 on Mac
Install Caffe on Mac
Install mecab on mac
Install mecab-python on Mac
Install cvxopt on 64bit Anaconda
Install pygame on python3.4 on mac
Install cvxpy on windows, Anaconda
Install OpenPose on mac (Catalina)
Install numba on your Mac
Install pandas 0.14 on python3.4 [on Mac]
Install Django on your Mac
Install pillow on Mac OSX 10.9
[Mac] Tips: Install pyquery on Mac [pyquery]
tensor flow with anaconda on mac
How to install mysql-connector-python on mac
Steps to install matplotlib on Mac
Anaconda environment construction on Mac (2018 version)
Install Sphinx on Mac OS X
Install Scipy on Mac OS Sierra
Install python3 on Mac (El Capitan)
How to install OpenCV on Mac
Install mitmproxy on Mac OS X
Install VirtualBox on CentOS 7 on VirtualBox (mac + vagrant)
Install PyStan on Windows without Anaconda
Steps to install python3 on mac
Install pgmagick on Mac OS X 10.9
Install Anaconda on Mac and upload Jupyter (IPython) notebook to Anaconda Cloud
How to install Theano on Mac OS X 10.10 (using pyenv, anaconda)
How to install drobertadams / toggl-cli on Mac
Put Anaconda on your Mac using Pyenv
Install python library on Lambda using [/ tmp]
Build Python environment with Anaconda on Mac
Personal Note Package to install on Anaconda
Theano on Anaconda
python on mac
Put Python's numerical calculation environment Anaconda on mac (2)
Put Python's numerical calculation environment Anaconda on mac
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
[Python] How to install OpenCV on Anaconda [Windows]
Install the machine learning library TensorFlow on fedora23
How to install / verify graphviz on anaconda / windows10
Install mecab on Marvericks
Install python on WSL
Install Faiss on CentOS 7
Install pip on Mavericks
Install Python on Pidora.
Install mongodb on termux
Install Python venv --VSCode --GitHub integration environment on Mac
Install Scrapy on python3
Install docker on Fedora31
Install selenium on Mac and try it with python