When a beginner who had never touched Python tried to install and run Python + SciPy, I was addicted to various things, so I tried to summarize the process of installing and running it as a memorandum.
Download the Python 3.5 installer from Python official website .
I'm using Windows 10 (64bit), so I downloaded the Windows x86-64 executable installer.
When you execute it, the following window will appear. Check Add Python 3.5 to PATH and click Install Now.
When the installation is completed, the following screen will appear. Click Close to close the installer.
At the command prompt, type python and press Enter. If Python starts, the Python installation is successful.
It seems that NumPy and MKL are required to run SciPy, so download the WHL file of NumPy + MKL from the URL below. http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
I downloaded numpy-1.11.1 + mkl-cp35-cp35m-win_amd64.whl because it is Windows10 (64bit), Python3.5 series.
Next, open a command prompt and execute `pip install (WHL file path)`
to install the downloaded WHL file.
If Sucessfully ... is displayed at the command prompt, the installation of NumPy + MKL is complete.
Download SciPy's WHL from the URL below. http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
I downloaded scipy-0.18.0rc2-cp35-cp35m-win_amd64.whl because it is Windows10 (64bit), Python3.5 series.
pip install
And install it.
You can check the installed packages by running pip freeze
at the command prompt.
I was able to confirm that NumPy + MKL and SciPy are installed.
Try running the following py file to make sure it's installed correctly
test.py
import numpy as np
from scipy import integrate
def computePi(x):
return 4/(1+x**2)
print (integrate.quad(computePi, 0, 1))
I was able to confirm that it works properly.
As an aside, I recommend using the Atom editor because you can run py files on the editor.
If you install atom-runner, you can run py on the editor.
Recommended Posts