Python の手元の最新バージョンでNumpy, Pandas, Matplotlib のパッケージを動作させるために行った作業の記録です。
VS Code のコマンドパレット(Windowsでは[Ctrl]+[Shift]+[P]キー)で確認したところ
バージョンがややこしいことになっています。
VS Code からターミナルを起動して、各パッケージを
Python 3.8.2
にインストールします。
PS C:\VSCode_WorkSpace\hog\fug> python --version
Python 2.7.17
PS C:\VSCode_WorkSpace\hog\fug> py --version
Python 3.8.2
###1. pipのアップグレード
PS C:\VSCode_WorkSpace\hog\fug> py -m pip install -U pip
Collecting pip
B)
|████████████████████████████████| 1.4MB 467kB/s
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully installed pip-20.0.2
###2. numpyのインストール
PS C:\VSCode_WorkSpace\hog\fug> py -m pip install numpy
Collecting numpy
Downloading numpy-1.18.2-cp38-cp38-win32.whl (10.8 MB)
|████████████████████████████████| 10.8 MB 722 kB/s
Installing collected packages: numpy
Successfully installed numpy-1.18.2
###3. pandasのインストール
PS C:\VSCode_WorkSpace\hog\fug> py -m pip install pandas
Collecting pandas
Downloading pandas-1.0.3-cp38-cp38-win32.whl (7.6 MB)
|████████████████████████████████| 7.6 MB 2.2 MB/s
Requirement already satisfied: numpy>=1.13.3 in c:\users\piyo\appdata\local\programs\python\python38-32\lib\site-packages (from pandas) (1.18.2)
Collecting pytz>=2017.2
Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)
Collecting python-dateutil>=2.6.1
Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
|████████████████████████████████| 227 kB 3.2 MB/s
Collecting six>=1.5
Downloading six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: pytz, six, python-dateutil, pandas
Successfully installed pandas-1.0.3 python-dateutil-2.8.1 pytz-2019.3 six-1.14.0
###4. Matplotlibのインストール
PS C:\VSCode_WorkSpace\hog\fug> py -m pip install matplotlib
Collecting matplotlib
Downloading matplotlib-3.2.1-cp38-cp38-win32.whl (9.0 MB)
|████████████████████████████████| 9.0 MB 3.3 MB/s
Requirement already satisfied: python-dateutil>=2.1 in c:\users\piyo\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib) (2.8.1)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
|████████████████████████████████| 67 kB 4.5 MB/s
Collecting cycler>=0.10
Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Downloading kiwisolver-1.2.0-cp38-none-win32.whl (43 kB)
|████████████████████████████████| 43 kB 3.4 MB/s
Requirement already satisfied: numpy>=1.11 in c:\users\piyo\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib) (1.18.2)
Requirement already satisfied: six>=1.5 in c:\users\piyo\appdata\local\programs\python\python38-32\lib\site-packages (from python-dateutil>=2.1->matplotlib)
(1.14.0)
Installing collected packages: pyparsing, cycler, kiwisolver, matplotlib
Successfully installed cycler-0.10.0 kiwisolver-1.2.0 matplotlib-3.2.1 pyparsing-2.4.7
###5. 参考サイト
https://gammasoft.jp/blog/install-numpy-pandas-matplotlib-by-pip/