Build a machine learning Python environment on Mac OS

Building a PyData environment for a machine learning study session (January 2017) Building an environment for Ubuntu using VirtualBox I wrote, but I also want it for Mac, so I am writing it.

This article is a Python standard environment construction method. We recommend this method.

I think it is good to prepare the environment like this for studying the following books.

-Machine Learning Python Programming (Impress)

What to use

Installation method

Python 3.6

--Get the Mac OS X 64-bit / 32-bit installer from the Python download https://www.python.org/downloads/release/python-360/ --After downloading, double-click to install.

Python can be used with python3 on Mac OS

Python virtual environment

Describe by building the environment in ~ / work / tmp.

$ mkdir ~/work/tmp
$ cd ~/work/tmp
$ python3 -m venv env

You now have a Python virtual environment in ~ / work / tmp / env I'm using a standard Python virtual environment creation tool called venv.

Library installation

$ cd ~/work/tmp
$ source env/bin/activate
(env)$ pip install numpy scipy pandas scikit-learn matplotlib
(env)$ pip install ipython[notebook]

Enable the Python virtual environment with the source command and install the library with pip.

The binary package is provided by wheel, which eliminates the need for compilation and can be easily installed in a Mac OS environment without installing an external module of the OS.

how to use

$ cd ~/work/tmp
$ source env/bin/activate
(env)$ jupyter notebook

Immediately after installing the library, the source command is executed and you are in the Python virtual environment, so you do not need to execute the source command.

Recommended Posts

Build a machine learning Python environment on Mac OS
Build a Python development environment on Mac OS X
Build a python machine learning study environment on macOS sierra
Build a machine learning environment on mac (pyenv, deeplearning, opencv)
Build a machine learning environment
Build a Python environment on Mac (Mountain Lion)
Build a Python development environment on your Mac
Build a Python machine learning environment with a container
Building a Python environment on Mac
Create a Python environment on Mac (2017/4)
Build a Python environment on your Mac using pyenv
Build a machine learning application development environment with Python
Build a python3 environment on CentOS7
Build a machine learning environment natively on Windows 10 (x64)
Build an environment for machine learning using Python on MacOSX
Build a python data analysis environment on Mac (El Capitan)
Machine learning environment settings based on Python 3 on Mac (coexistence with Python 2)
Build a python environment on MacOS (Catallina)
Create a python environment on your Mac
Build Python environment with Anaconda on Mac
Build a Python + OpenCV environment on Cloud9
Build AI / machine learning environment with Python
I tried to build an environment for machine learning with Python (Mac OS X)
Build a Python environment on your Mac with Anaconda and PyCharm
Simply build a Python 3 execution environment on Windows
Build a python environment with ansible on centos6
Build a Python development environment on Raspberry Pi
[Definitive Edition] Building an environment for learning "machine learning" using Python on Mac
Build Python environment on Windows
Build python environment on windows
Build a Python environment offline
Build a "Deep learning from scratch" learning environment on Cloud9 (jupyter miniconda python3)
Build a GVim-based Python development environment on Windows 10 (3) GVim8.0 & Python3.6
Install Python3 on Mac and build environment [Definitive Edition]
Build an interactive environment for machine learning in Python
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Build a local development environment for Laravel6.X on Mac
Build a GVim-based Python development environment on Windows 10 (1) Installation
How to build a Django (python) environment on docker
Build a Python development environment using pyenv on MacOS
Building a Python environment for programming beginners (Mac OS)
Memo for building a machine learning environment using Python
How to build a Python environment on amazon linux 2
Create a Python development environment on OS X Lion
Building a Python environment on Ubuntu
Python environment construction memo on Mac
Create a python environment on centos
Environment construction of python3.8 on mac
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Create a Python (pyenv / virtualenv) development environment on Mac (Homebrew)
How to build a new python virtual environment on Ubuntu
Build a machine learning scikit-learn environment with VirtualBox and Ubuntu
Building a Python environment on a Mac and using Jupyter lab
Build a GVim-based Python development environment on Windows 10 (2) Basic settings
Build a Python extension for E-Cell 4 on Mac OSX (Yosemite)
Build a python environment with pyenv (OS X El Capitan 10.11.3)
Create a virtual environment for python on mac [Very easy]
Build a PyData environment for a machine learning study session (January 2017)
Build a python environment on CentOS 7.7 for your home server
Build a machine learning environment using PyCharm on Ubuntu environment (TensorFlow will also be introduced!)
Until you create a machine learning environment with Python on Windows 7 and run it