Since I had the opportunity to build the Python environment again under the Windows environment, I tried to summarize the procedure for building the environment as a test post and a memorandum. Other great people put it together "intelligibly", but please understand that it is a practice.
First, access python Japan and download the Python 2.x series. You can also go directly to python.org.
Scroll down the page when you reach the download destination. You will reach Files, so click on the appropriate file.
After downloading, launch the installer and proceed along the way. Click Next> twice.
When you click ▼, "will be installed on local hard drive" is displayed. Click it. Doing this will save you the task of telling your PC where to find Python later, "put it in your PATH". (← It's convenient!)
When you're done, press Finish to complete the installation.
###Tips There are 2.x and 3.x versions of Python. The transition from 2.x series to 3.x series is gradually progressing, but in general, 2.x series is widely used and there are many packages that are easy to receive support, so 2.x series. We will build the environment on the premise of.
[reference]
Please start ** Command Prompt ** from accessories. When it starts up, try entering the command that displays the help below.
>python -h
If you see Python help, you're good to go. This is the end of the basic installation. Then try entering the help command for pip, your package management tool.
>pip -h
If you see pip help, you're good to go. I have a command that displays a list called `` `freeze```, but I'll use it later.
From here, we will install packages that are convenient to include.
The following command will give an error first,
>pip install numpy
Maybe the error is
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
If it's the kind of, the question posted on stackoverflow (error: Unable to find vcvarsall.bat) I think it can be solved with, but I stopped because it was a mess.
So let's borrow the installer from our great predecessor, Christoph Gohlke. It's very easy. Thanks!
Unofficial Windows Binaries for Python Extension Packages
If you follow the link, you will see the following page. Find Numpy and Scipy in this. You can also press "CTRL + f" and search for "numpy" or "scipy".
If you go down, you'll reach the NumPy download page. This time, I'm using Python 2.7, so please download the 64-bit version of the installer. For 32-bit version and others, select the corresponding installer.
Download SciPy as well.
After downloading, launch the installer and press Next to install it.
** \ * Note: It is assumed that numpy is installed above! ** **
Install using pip. Launch ** Command Prompt ** and try entering the following command.
>pip install matplotlib
If the installation is successful, you should see the following comment.
Successfully installed matplotlib pyparsing python-dateutil pytz six Cleaning up...
Finally, let's check if the package is installed. First, launch ** Command Prompt ** as usual.
Then enter the following command.
>pip freeze
The list of installed packages should look like this: If you don't see it, you've probably made a mistake somewhere. In that case, please reinstall the missing package.
matplotlib==1.4.2
numpy==1.9.1
pyparsing==2.0.3
python-dateutil==2.3
pytz==2014.10
scipy==0.15.0
six==1.9.0
Let's see if it actually works. Try entering the following commands in quick succession. If there are no errors, it's okay.
>python
>>> import numpy
>>> import scipy
>>> import matplotlib
>>> ^Z
The final "^ Z" indicates the keystroke of "Ctrl + z". You can enter this to quit python. As an image, it looks like this.
If the above procedure doesn't work, please let me know in the comments. We welcome any advice or suggestions.
Rerigo
Recommended Posts