Introduction to python-Environmental preparation (mac edition)

First install pyenv

What is pyenv

A version control tool for python. It is convenient because you can switch between multiple versions.

It is the same as rbenv of phpenv.ruby in PHP.

pyenv

install

Installed using homebrew.

$ brew install pyenv
...
...
There are various
...
...
$ pyenv --version
pyenv 20151006

Python installation

Let's check the list of Python versions that can be installed with pyenv.

$ pyenv install --list
Available versions:
  2.1.3
  2.2.3
  2.3.7
  2.4
  2.4.1
  2.4.2
  2.4.3
  2.4.4
  2.4.5
  2.4.6
  ...
Omission... 
  ...

For the time being, I will put in the 2nd and 3rd series.

To install, just specify the version as pyenv install x.x.x as shown in ↓.

$ pyenv install 2.7.9

...
Omission
...

Installed Python-2.7.9 to /Users/riki/.pyenv/versions/2.7.9
$ pyenv install 3.5.0

...
Omission
...

Installed Python-3.5.0 to /Users/riki/.pyenv/versions/3.5.0

Change the version of Python used

As a test, let's see which version it is now.

$ python --version
2.7.10

This is the default version. It is necessary to specify the version installed by pyenv properly.

#Check the available version
$ pyenv versions
* system (set by /Users/riki/.python-version)
  2.7.9
  3.5.0 

#Specify the version to use
$ pyenv local 3.5.0
$ pyenv rehash
$ python --version
Python 3.5.0

You can now use 3.5.0.

Recommended Posts

Introduction to python-Environmental preparation (mac edition)
Introduction to Python Django (2) Mac Edition
Introduction to Deep Learning ~ Dropout Edition ~
Introduction to discord.py (1st day) -Preparation for discord.py-
Introduction to Machine Learning-Hard Margin SVM Edition-
Introduction to MQTT (Introduction)
Introduction to Scrapy (1)
Introduction to Scrapy (3)
Introduction to Supervisor
Introduction to Tkinter 1: Introduction
Introduction to PyQt
Introduction to Scrapy (2)
[Linux] Introduction to Linux
Introduction to Scrapy (4)
Introduction to discord.py (2)
Introduction to discord.py
Introduction to Web Scraping
Introduction to Nonparametric Bayes
Introduction to Python language
Introduction to TensorFlow-Image Recognition
Introduction to OpenCV (python)-(2)
Introduction to Dependency Injection
Introduction to Private Chainer
Introduction to machine learning
20200329_Introduction to Data Analysis with Python Second Edition Personal Summary
[Introduction to Mac] Convenient Mac apps and settings that I use
Introduction to Socket API Learned in C Part 2 Client Edition
AOJ Introduction to Programming Topic # 1, Topic # 2, Topic # 3, Topic # 4
Introduction to electronic paper modules
A quick introduction to pytest-mock
Introduction to dictionary lookup algorithm
[Learning memorandum] Introduction to vim
Introduction to PyTorch (1) Automatic differentiation
opencv-python Introduction to image processing
Introduction to Python Django (2) Win
Kubernetes Scheduler Introduction to Homebrew
An introduction to machine learning
[Introduction to cx_Oracle] Overview of cx_Oracle
[Introduction to pytorch-lightning] First Lit ♬
Introduction to Anomaly Detection 1 Basics
[Introduction to Systre] Fibonacci Retracement ♬
Introduction to Nonlinear Optimization (I)
Update python on Mac to 3.7-> 3.8
AOJ Introduction to Programming Topic # 5, Topic # 6
Introduction to Deep Learning ~ Learning Rules ~
[Introduction to Python] <list> [edit: 2020/02/22]
Introduction to Python (Python version APG4b)
An introduction to Python Programming
[Introduction to cx_Oracle] (8th) cx_Oracle 8.0 release
Introduction to discord.py (3) Using voice
An introduction to Bayesian optimization
Deep Reinforcement Learning 1 Introduction to Reinforcement Learning
Super introduction to machine learning
Introduction to Ansible Part ③'Inventory'
Series: Introduction to cx_Oracle Contents
[Introduction] How to use open3d
Introduction to Python For, While
Introduction to Deep Learning ~ Backpropagation ~
Introduction to Ansible Part ④'Variable'
Introduction to vi command (memorandum)
Introduction to Socket API Learned in C Language Part 1 Server Edition