Memo for building a machine learning environment using Python

It is assumed to be built on MacOSX.

For the time being, keep the homebrew environment at hand up to date.

$ brew update
$ brew upgrade

Install pyenv

$ brew install pyenv

Install developer tools

Install XCode developer tools if you haven't already done so.

$ xcode-select --install

Setting environment variables

Add the following to ~ / .bash_profile.

~/.bash_profile


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

Python installation

Check the version of python that can be installed.

$ pyenv install --list

Here, install 3.4.3.

$ pyenv install 3.4.3

Switch your Python version to 3.4.3, which you just installed.

$ pyenv global 3.4.3
$ pyenv rehash

Installation of machine learning related libraries

$ pip install numpy
$ pip install scipy
$ pip install matplotlib
$ pip install scikit-learn

that's all.

Recommended Posts

Memo for building a machine learning environment using Python
How about Anaconda for building a machine learning environment in Python?
Building a Windows 7 environment for getting started with machine learning with Python
[Definitive Edition] Building an environment for learning "machine learning" using Python on Windows
[Definitive Edition] Building an environment for learning "machine learning" using Python on Mac
Build an environment for machine learning using Python on MacOSX
Python & Machine Learning Study Memo: Environment Preparation
[Mac] Building a virtual environment for Python
Building a Python development environment for AI development
Creating a development environment for machine learning
A memo for creating a python environment by a beginner
Build a Python machine learning environment with a container
Building a Python virtual environment
Build a machine learning environment
Building a Python virtual environment
Building a Python environment for pyenv, pyenv-virtualenv, Anaconda (Miniconda)
Write about building a Python environment for writing Qiita Qiita
Building a Docker working environment for R and Python
Build a machine learning Python environment on Mac OS
Building a training environment for penetration testing using Naumachia
Python learning memo for machine learning by Chainer from Chapter 2
Python learning memo for machine learning by Chainer Chapters 1 and 2
Build a machine learning application development environment with Python
Procedure for building a CDK environment on Windows (Python)
[Python] I made a classifier for irises [Machine learning]
Building a Python environment for programming beginners (Mac OS)
Building a Python environment on Mac
Building a Python environment on Ubuntu
Building a virtual environment with Python 3
<For beginners> python library <For machine learning>
"Scraping & machine learning with Python" Learning memo
Building a python environment for artificial intelligence (Chainer / TensorFlow / CSLAIER)
Building a Python environment on a Mac and using Jupyter lab
Building a development environment for Android apps-creating Android apps in Python
Building a Hy environment for Lisper who hasn't touched Python
Launching a machine learning environment using Google Compute Engine (GCE)
[Python] Building a virtual python environment for the pyramid tutorial (summary)
Python learning memo for machine learning by Chainer Chapter 7 Regression analysis
Build a PyData environment for a machine learning study session (January 2017)
Until building a Python development environment using pyenv on Ubuntu 20.04
[Pyenv] Building a python environment with ubuntu 16.04
Building a Python3 environment with Amazon Linux2
[Python machine learning] Recommendation of using Spyder for beginners (as of August 2020)
Building a Docker working environment for R and Python 2: Japanese support
Amplify images for machine learning with python
Python learning memo for machine learning by Chainer Chapter 8 Introduction to Numpy
Python learning memo for machine learning by Chainer Chapter 10 Introduction to Cupy
Building a virtual environment using homebrew + pyenv-virtualenv
Let's create a virtual environment for Python
Why Python is chosen for machine learning
Try using virtualenv, which can build a virtual environment for Python
The shortest memo for building a python environment that takes less than 5 minutes to work.
From building a Python environment for inexperienced people to Hello world
Building a Python 3.6 environment with Windows + PowerShell
[Python] Create a Batch environment using AWS-CDK
[Shakyo] Encounter with Python for machine learning
Building an HPC learning environment using Docker Compose (C, Python, Fortran)
[Python] Web application design for machine learning
Python and machine learning environment construction (macOS)
Building a conda environment for ROS users
[Memo] Machine learning