--Update homebrew and install pyenv
$ brew update
$ brew upgrade
$ brew install pyenv
$ pyenv --version ###Confirm that pyenv installation is complete
--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 ↓)
Procedure when you want to add a library via anaconda
`$ conda install --channel [path] [library name]`
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