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)
Windows Python 3.6.1 (64bit) Windows 7 Professional(64bit)
RHEL Python 3.6.1 Red Hat Enterprise Linux 7.2
Windows
Download the installer from the Python home page (https://www.python.org/downloads/).
** 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.
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.
>>>
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.
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
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
.
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
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.
Check the version of the installed component.
# python -m pip freeze
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