How to install Python [Windows]

Overview

Since the procedure for installing Python on windows has become quite convenient, I will describe the steps from installation to the first step as a memo to explain the series of operations to others.

What to install this time

Python body Useful Python library

Installation of Python itself

Python installation

Download the installer from the Python official website.

Click ʻInstall Now` to start the installation, and when it is complete, the Python installation is complete.

Check if it was installed

Type cmd on the one that appears in [Windows] + [R] and press enter to launch the command prompt. It's okay if you type python -h on that screen and get various help.

Convenient library installation

There are many useful libraries in python. I will introduce some of them that are convenient to include and how to install them. Basically, you can install libraries with pip install library name at the command prompt, but there are some exceptions. numpy numpy is a library that is good at handling matrices. It is one of the things that are convenient and often used once you get used to it. It is possible to install with pip, but the following method is recommended because an error will occur when using the libraries described below. Go to this site and download the corresponding version. (If the part of cp ○○ is the version and Python 3.6, select the one that is 36) At the command prompt, enter pip install the downloaded file to start the installation. (If you drag and drop the downloaded file to the command prompt, the path will be written automatically.)

scipy scipy is a library that is good at numerical calculations such as Fourier transform. If you use pip, an error will occur, so install it using the following method. Go to this site and download the corresponding version. (If the part of cp ○○ is the version and Python 3.6, select the one that is 36) At the command prompt, enter pip install the path of the downloaded file to start the installation. (If you drag and drop the downloaded file to the command prompt, the path will be written automatically.)

matplotlib matplotlib is a library that can draw graphs. The range of expression is widened because it is easy to visualize. matplotlib can be installed by typing pip install matplotlib at the command prompt.

seaborn seaborn cleans nicely when drawing with matplotlib. Since pip does not work, download the seaborn file from this site. At the command prompt, enter pip install the path of the downloaded file to start the installation. (If you drag and drop the downloaded file to the command prompt, the path will be written automatically.)

pandas pandas is a library that specializes in statistical processing. Processing on data becomes easier. You can enter pandas by typing pip install pandas at the command prompt.

Check if it was installed

Type python at the command prompt to launch the Python environment. If there is no error in ʻimport library name`, the installation is complete.

Editor installation

To write Python code, use something like an enhanced version of Notepad called a text editor. What I am using is atom. There are also sublimeText, Vim, Emacs, etc., but I think atom or sublimeText is kind to beginners. Just add some editor and you're ready to go.

First step

Let's take the first step with Python. Open your favorite editor, write as follows and save it as test.py

test.py


print("hello world!")

Launch the command prompt and move to the folder where test.py is located.

Then enter the following at the command prompt to run python.

in[1]


python test.py

If you see the following, you have successfully started to get started with Python.

out[1]


hello world!

Thank you for your hard work (^^)

Recommended Posts

How to install Python [Windows]
How to install Python
How to install python
[Kivy] How to install Kivy on Windows [Python]
[2020.8 latest] How to install Python
[Python] How to install OpenCV on Anaconda [Windows]
How to install python using anaconda
How to install pycrypto on Windows
How to install music 21 on windows
How to install pip
How to install and use pandas_datareader [Python]
python3 How to install an external module
How to install archlinux
How to install BayesOpt
Install python on windows
How to install richzhang / colorization on Windows 10
How to install Windows Subsystem For Linux
How to install Nbextensions
How to install Prover9
Install Python (for Windows)
How to install python3 with docker centos
[2020 version] How to install Python3 on AWS EC2
How to install OpenCV on Jetson Nano Python
How to install Python for pharmaceutical company researchers
How to quickly install h5py on Windows 10 [Unofficial]
How to install / verify graphviz on anaconda / windows10
Install watchdog on Windows + Python 3.3
python3: How to use bottle (2)
Install Python and Flask (Windows 10)
Tabpy 1.0 (2020-01 version) How to install
Windows10: Install python dlib library
[Python] How to use list 1
How to update Python Tkinter to 8.6
How to use Python argparse
How to install mkl numpy
Python: How to use pydub
[Python] How to use checkio
How to run Notepad ++ Python
How to change Python version
How to install Pelican blog
How to develop in Python
[Python] [Chainer] [Windows] Install Chainer on Windows
[python] How to judge scalar
Python install in 2 lines @Windows
[Python] How to use input ()
How to use Python lambda
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
How to use Python bytes
Install dlib for Python (Windows)
How to embed mod_wsgi into Apache on Python Windows
install python
How to write a Python class
[Python] How to FFT mp3 data
[Python] How to do PCA in Python
Python: How to use async with
Python 3.6 on Windows ... and to Xamarin.
How to install mysql-connector-python on mac
How to install and use Tesseract-OCR
[Python] How to derive nCk (ABC156-D)