Python installation

Introduction

Since it was necessary to operate with Python 3 for environment construction, I will summarize how to switch from the existing Python version.

Check the current version

$ python --version
Python 2.7.16

Python is originally installed. But the version is not the latest. Depending on the environment, it may be necessary to change the version.

Install new version

To install the new version, install from Official Site. Once you have completed the installation steps, the next step is.

Version switching

$ pyenv global 3.8.1
$ eval "$(pyenv init -)"
$ python --version
Python 3.8.1

global means to reflect in the whole. local reflects the version specified in the current directory. This time, I specified global because it will be reflected in the whole.

Verification

$ python --version
Python 3.8.1

You can see that it is reflected properly, this completes the version switching.

in conclusion

I have summarized it because it may be necessary to build an environment similar to working in a virtual environment. The article "Changing the python version with pyenv" explains the version switching more carefully.

Reference site

"Change python version with pyenv" https://qiita.com/Kohey222/items/19eb9b3cbcec9b176625

Recommended Posts

Python installation
Python installation
Python installation (Windows)
Python installation 2020 (macOS)
Python3.4 installation notes
python openCV installation (memo)
Python basic course (2 Python installation)
Reinforcement learning 1 Python installation
Python
Python installation method Windows
Installation of Python 3.3 rc1
Python 2.7 installation (yum) (CentOS 6.8)
Installation of matplotlib (Python 3.3.2)
Python 3.5 installation (yum) (CentOS 6.8)
python (pyenv + pyenv-virtualenv) + CentOS7 installation
Python CMS Mezzanine installation procedure
Python 3.6 installation procedure [for Windows]
Python installation and basic grammar
OpenCV3 installation for Python3 @macOS
Python installation (Mac edition) (old)
Fastest Python installation on Windows
Python 3 series installation for mac
Ruby, Python Module Installation Guide
Source installation and installation of Python
Python (Python 3.7.7) installation and basic grammar
kafka python
Python basics ⑤
python + lottery 6
Built-in python
Python comprehension
Python technique
Studying python
Python 2.7 Countdown
Python memorandum
Python FlowFishMaster
Python service
Installation of SciPy and matplotlib (Python)
Django installation
Cuda installation
I tried to touch Python (installation)
python function ①
Python basics
Python memo
Python practice_Virtual environment setup ~ Django installation
ufo-> python (3)
boto3 installation
Python comprehension
Pythia Installation
install python
Python Singleton
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Docker installation
Python increment
Volatility installation
python tips
Installing Python 3.4.3.
Try python
Python memo