--Homebrew installation --pyenv installation --Anaconda installation -(I gave up building a virtual environment) --Start Jupyter Notebook
terminal
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
For the time being, it was said to be Already up-to-date.
terminal
$ brew install pyenv
$ echo 'eval "$(pyenv init -)"' >> ~/.zshrc
$ exec $SHELL -l
terminal
$ pyenv install anaconda3-2019.10
$ pyenv global anaconda3-2019.10
It seems that pyenv global
is trying to run the corresponding Python version in all directories. If you want to use the corresponding version only in a specific directory, it seems that you should do something like pyenv local anaconda3-2019.10
.
terminal
$ python
Python 3.7.4 (default, Aug 13 2019, 15:17:50)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you type python
and the above appears, the installation is successful. (For v.3 series)
Exit Python's interactive shell by pressing Ctrl + D (or typing quit ()).
That's right, but this doesn't work.
terminal
$ pyenv install anaconda3-5.3.1
$ pyenv global anaconda3-5.3.1
$ python 3
terminal
Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
So there is no sign of anaconda
terminal
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ pyenv rehash
$ python3
Python 3.7.0 (default, Jun 28 2018, 07:39:16)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
Oh. Signs of Anaconda.
terminal
$ jupyter notebook
It started with!
I thought it was zsh from macOS Catalina, The update user is bash, You should change it to zsh.
In macOS 10.15 Catalina, the default login shell is changed from "bash" to "zsh".
Well, I have to change the shell to zsh. If that happens, Anaconda and pyenv will not move. I wonder if ... Good luck.
[Jupyter Notebook] Let's know how to use it effectively [Python / Machine learning]
Understanding the essence of environment construction (concepts such as PATH) [Python]
[Note from installing Homebrew to building an Anaconda environment for Python with pyenv] (https://qiita.com/aical/items/2d066801a7464a676994)
[Keras / TensorFlow] Keras (Tensorflow) environment construction
Recommended Posts