[Note] Installing Python 3.6 + α on Windows and RHEL

Introduction

To study Python, I built Python 3.6 on Windows and RHEL. Especially in the Windows version, I had a hard time installing numpy and scipy, so I summarized the procedure as a memorandum. I am writing it as a personal memo. (Half a month since I started Python)

environment

  1. Windows Python 3.6.1 (64bit) Windows 7 Professional(64bit)

  2. RHEL Python 3.6.1 Red Hat Enterprise Linux 7.2

Installation procedure

Windows

Download installer

Download the installer from the Python home page (https://www.python.org/downloads/).

無題.png

** Supplement ** When I downloaded it from Download the latest version for Windows, Python with 32bit version and 64bit version was downloaded, and when I executed the python command after installation, the 32bit version worked as standard. Since I only use the 64-bit version, I specified python-3.6.1-amd64.exe and downloaded it.

無題1.png

1. Setup

Follow the instructions in the installation wizard to install. After installation, display the console and check the version.

C:\>python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

2. Components

Since an error occurred during the installation of scipy, it was addressed by referring to Installing Python 3.5.1 + numpy + scipy + α in Windows environment. (It was organized in an easy-to-understand manner, which was helpful. Thank you.) kenichi-t's recommended as per the compiled component to download, was installed.

python -m pip install numpy-1.13.0+mkl-cp36-cp36m-win_amd64.whl
python -m pip install pandas
python -m pip install scipy-0.19.1-cp36-cp36m-win_amd64.whl
python -m pip install scikit-learn
python -m pip install matplotlib
python -m pip install seaborn
python -m pip install jupyter
python -m pip install cmake
python -m pip install nose
python -m pip install quandl
python -m pip install tensorflow
python -m pip install xgboost-0.6-cp36-cp36m-win_amd64.whl
python -m pip install sklearn
python -m pip install virtualenv
python -m pip install gensim
python -m pip install nltk
python -m pip install keras

** Supplement ** Since there is no 32bit version of tensorflow, only Python (64bit version) can be installed.

3. Check the component version

Check the version of the installed component.

C:\>python -m pip freeze
Keras==2.0.5
matplotlib==2.0.2
numpy==1.13.0+mkl
pandas==0.20.2
scikit-learn==0.18.2
scipy==0.19.1
seaborn==0.7.1
tensorflow==1.2.1
~ Omitted ~

RHEL

Source download

Linux seems to compile and install the source, and download the source (https://www.python.org/downloads/). Click Gzipped source tarball to download Python-3.6.1.tgz.

無題2.png

1. Setup

Compile Python with the following command.

# tar zxvf Python-3.6.1.tgz
# cd Python-3.6.1/
# ./configure
# make
# make test
# make install

After installation, display the console and check the version.

# python
Python 3.6.1 (default, Jun 16 2017, 13:46:01)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

** Supplement ** In my environment, I got a compile error with the error that bzip2-devel is missing, so I installed it in advance with the rpm command.

# rpm -ihv bzip2-devel-1.0.6-13.el7.x86_64.rpm

2. Components

Linux could be installed with the pip command.

# python -m pip install numpy
# python -m pip install pandas
# python -m pip install scipy
# python -m pip install scikit-learn
# python -m pip install matplotlib
# python -m pip install seaborn
# python -m pip install jupyter
# python -m pip install cmake
# python -m pip install nose
# python -m pip install quandl
# python -m pip install tensorflow
# python -m pip install xgboost
# python -m pip install sklearn
# python -m pip install virtualenv
# python -m pip install gensim
# python -m pip install mecab-python3
# python -m pip install nltk
# python -m pip install keras
# python -m pip install psycopg2

** Supplement ** matplotlib doesn't seem to support Linux and couldn't be installed.

3. Check the component version

Check the version of the installed component.

# python -m pip freeze

Finally

I had it installed and there were too few articles about the event, so I wrote it without a gala. For those who want to do Python in Windows or RHEL environment, I hope that the startup hurdle will be lowered as much as possible. Also, if there are any mistakes or supplements in the article, please point them out.

Recommended Posts

[Note] Installing Python 3.6 + α on Windows and RHEL
Notes on installing Python3 and using pip on Windows7
Python 3.6 on Windows ... and to Xamarin.
Installing Kivy on Windows10 64bit Python3.5
Integrate Modelica and Python on Windows
Python on Windows
[Note] Procedures for installing Ubuntu on Windows 10
Use without installing python 2.x on Windows
[Beginner] Installing Python and running programs (Windows)
Install and run Python3.5 + NumPy + SciPy on Windows 10
(Windows) Causes and workarounds for UnicodeEncodeError on Python 3
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Installing pandas on python2.6
python basic on windows ②
Install python on windows
Installing TensorFlow on Windows Easy for Python beginners
Install ZIP version Python and pip on Windows 10
To avoid seeing hell when installing django-toolbelt on windows, heroku and python3.4 (64bit) ...
[Windows] [Python3] Install python3 and Jupyter Notebook (formerly ipython notebook) on Windows
Installing Python 3 on Mac and checking basic operation Part 1
Create a decent shell and python environment on Windows
Set-enable Python virtualenv on Windows
Run Openpose on Python (Windows)
Install watchdog on Windows + Python 3.3
Python on Ruby and angry Ruby on Python
Python + Kivy development on Windows
Sphinx-autobuild (0.5.2) on Windows7, Python 3.5.1, Sphinx 1.3.5
Fastest Python installation on Windows
Build Python environment on Windows
Notes on installing Python on Mac
Build python environment on windows
I ran python on windows
Notes on installing Anaconda 3 on Windows
[Python] [Chainer] [Windows] Install Chainer on Windows
Use Python on Windows (PyCharm)
Notes on installing Python on CentOS
Until you create Python Virtualenv on Windows and launch Jupyter
Install python and Visual Studio Code on windows10 (April 2020 version)
Python and pip commands are not available on CentOS (RHEL) 8
Notes on Python and dictionary types
About installing Pwntools and Python2 series
Anaconda python environment construction on Windows 10
Install xgboost (python version) on Windows
Install Python on Windows + pip + virtualenv
Build and install OpenCV on Windows
Support when installing pillow on python3.9
Notes on installing Python using PyEnv
Mecab / Cabocha / KNP on Python + Windows
Mastering pip and wheel on windows
Install Python development environment on Windows 10
Python CGI file created on Windows
Getting started with Python 3.8 on Windows
Reproduce One-Touch Search on Python 3.7.3. (Windows 10)
Install easy_install and pip on windows
[Python] Until CuPy is installed on Windows 10 and CUDA core is used
Build a 64-bit Python 2.7 environment with TDM-GCC and MinGW-w64 on Windows 7
Error and solution when installing python3 with homebrew on mac (catalina 10.15)
A note on using tab completion when running Python interactively on Windows
The road to installing Python and Flask on an offline PC
Building a Python development environment on Windows -From installing Anaconda to linking Atom and Jupyter Notebook-
Python and Bash on Cisco Catalyst IOS-XE