Introduction of Python

Note that I installed Python on my Mac

Install pyenv

pyenv is a tool that "manages multiple versions of Python". For the time being, you should put it in.

Install with homebrew

brew install pyenv

If the version is displayed below, it means that it has been installed.

pyenv -v

pyenv settings

I'm using zsh, so I set the following.

.zshrc settings

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH="$HOME/.pyenv/shims:$PATH"
eval "$(pyenv init -)"

Reflect the settings

source .zshrc

Python installation

As mentioned at the beginning, pyenv allows you to use multiple versions of Python. What version of Python can be installed Try running the following command in a terminal.

pyenv install --list

In my case in the above list, 3.9.0 seems to be the latest, so I will install it.

pyenv install 3.9.0

Let's check below to see if it was installed.

pyenv versions
[~/work] % pyenv versions

*  system
   3.9.0 (set by /Users/XXXXX/.pyenv/version)

In the above, because of the system, we are using the version of Python that is installed by default on the Mac. Let's change it.

pyevn global 3.9.0

Finally, confirm that it has been changed to 3.9.0 properly and it is completed.

python --version

Recommended Posts

Introduction of Python
Introduction of Python
Introduction of activities applying Python
Introduction of scikit-optimize
Introduction of PyGMT
Basics of Python ①
Basics of python ①
Copy of python
Introduction of python drawing package pygal
Record of Python introduction for newcomers
Introduction of cymel
General Theory of Relativity in Python: Introduction
Easy introduction of speech recognition with Python
Easy introduction of python3 series and OpenCV3
[Introduction to Data Scientists] Basics of Python ♬
[Python] Operation of enumerate
List of python modules
Introduction of trac (Windows + trac 1.0.10)
Unification of Python environment
Copy of python preferences
Basics of Python scraping basics
Introduction of ferenOS 1 (installation)
[python] behavior of argmax
Usage of Python locals ()
Introduction of Virtualenv wrapper
the zen of Python
Introduction to Python language
Introduction to OpenCV (python)-(2)
Installation of Python 3.3 rc1
Python Basic Course (Introduction)
# 4 [python] Basics of functions
Basic knowledge of Python
Sober trivia of python3
Summary of Python arguments
Python Beginner's Guide (Introduction)
Basics of python: Output
Installation of matplotlib (Python 3.3.2)
Application of Python 3 vars
Various processing of Python
[Introduction to Udemy Python 3 + Application] 26. Copy of dictionary
[Introduction to Udemy Python 3 + Application] 19. Copy of list
Python & Machine Learning Study Memo ②: Introduction of Library
Introduction of Python Imaging Library (PIL) using HomeBrew
Kyoto University Python Lecture Material: Introduction of Columns
[Introduction to Python] Basic usage of lambda expressions
[Python] Correct usage of map
Towards the retirement of Python2
Introduction to Python Django (2) Win
Operate mongoDB from python in ubuntu environment ① Introduction of mongoDB
Summary of python file operations
Summary of Python3 list operations
Python --Quick start of logging
Recommendation of binpacking library of python
[Introduction to cx_Oracle] Overview of cx_Oracle
[python] Value of function object (?)
Automatic update of Python module
Python --Check type of values
[Python] Etymology of python function names
About the ease of Python