pipでライブラリをインストールしたときの記録。
numpy
1 2 3 4 5 6 7 8 |
C:...\python>python -m pip install numpy Collecting numpy Downloading numpy-1.11.1-cp35-none-win_amd64.whl (7.6MB)a 100% |################################| 7.6MB 36kB/s Installing collected packages: numpy Successfully installed numpy-1.11.1 You are using pip version 7.1.2, however version 8.1.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. |
pipのアップグレード
最初にnumpyをインストールした直後にメッセージが出た。
1 2 3 4 5 6 7 8 9 |
C:...\python>python -m pip install --upgrade pip Collecting pip Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB) 100% |################################| 1.2MB 174kB/s Installing collected packages: pip Found existing installation: pip 7.1.2 Uninstalling pip-7.1.2: Successfully uninstalled pip-7.1.2 Successfully installed pip-8.1.2 |
matplotlib
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
C:...\python>python -m pip install matplotlib Collecting matplotlib Downloading matplotlib-1.5.3-cp35-cp35m-win_amd64.whl (6.5MB) 100% |################################| 6.5MB 92kB/s Collecting python-dateutil (from matplotlib) Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB) 100% |################################| 204kB 400kB/s Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6 in c:\users...\appdata\local\programs\python\python35\lib\site-packages (from matplotlib) Collecting pytz (from matplotlib) Downloading pytz-2016.6.1-py2.py3-none-any.whl (481kB) 100% |################################| 481kB 465kB/s Collecting pyparsing!=2.0.4,!=2.1.2,>=1.5.6 (from matplotlib) Downloading pyparsing-2.1.9-py2.py3-none-any.whl (55kB) 100% |################################| 61kB 751kB/s Collecting cycler (from matplotlib) Downloading cycler-0.10.0-py2.py3-none-any.whl Collecting six>=1.5 (from python-dateutil->matplotlib) Downloading six-1.10.0-py2.py3-none-any.whl Installing collected packages: six, python-dateutil, pytz, pyparsing, cycler, matplotlib Successfully installed cycler-0.10.0 matplotlib-1.5.3 pyparsing-2.1.9 python-dateutil-2.5.3 pytz-2016.6.1 six-1.10.0 |
scipy
エラー発生
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
C:...\python>python -m pip install scipy Collecting scipy Downloading scipy-0.18.1.tar.gz (13.1MB) 100% |################################| 13.1MB 52kB/s Installing collected packages: scipy Running setup.py install for scipy ... error Complete output from command C:\Users...\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users...\\AppData\\Local\\Temp\\pip-build-qqtiwqdj\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users...\AppData\Local\Temp\pip-p09190cf-record\install-record.txt --single-version-externally-managed --compile: Note: if you need reliable uninstall behavior, then install with pip instead of using `setup.py install`: - `pip install .` (from a git repo or downloaded source release) - `pip install scipy` (last SciPy release on PyPI) lapack_opt_info: openblas_lapack_info: libraries openblas not found in ['C:...\\Python\\Python35\\lib', 'C:\\', 'C:\\Users...\\AppData\\Local\\Programs\\Python\\Python35\\libs'] NOT AVAILABLE lapack_mkl_info: mkl_info: libraries mkl,vml,guide not found in ['C:\\Users...\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users...\\AppData\\Local\\Programs\\Python\\Python35\\libs'] NOT AVAILABLE NOT AVAILABLE atlas_3_10_threads_info: Setting PTATLAS=ATLAS C:...\Python\Python35\lib\site-packages\numpy\distutils\system_info.py:639: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.11.38-sse2-64\lib is invalid. warnings.warn('Specified path %s is invalid.' % d) <class 'numpy.distutils.system_info.atlas_3_10_threads_info'> NOT AVAILABLE atlas_3_10_info: <class 'numpy.distutils.system_info.atlas_3_10_info'> NOT AVAILABLE atlas_threads_info: Setting PTATLAS=ATLAS <class 'numpy.distutils.system_info.atlas_threads_info'> NOT AVAILABLE atlas_info: <class 'numpy.distutils.system_info.atlas_info'> NOT AVAILABLE C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\system_info.py:1548: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) lapack_info: libraries lapack not found in ['C:\\Users...\\AppData\\Local\\Programs\\Python\\Python35\\lib', 'C:\\', 'C:\\Users...\AppData\\Local\\Programs\\Python\\Python35\\libs'] NOT AVAILABLE C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\system_info.py:1559: UserWarning: Lapack (http://www.netlib.org/lapack/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [lapack]) or by setting the LAPACK environment variable. warnings.warn(LapackNotFoundError.__doc__) lapack_src_info: NOT AVAILABLE C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\system_info.py:1562: UserWarning: Lapack (http://www.netlib.org/lapack/) sources not found. Directories to search for the sources can be specified in the numpy/distutils/site.cfg file (section [lapack_src]) or by setting the LAPACK_SRC environment variable. warnings.warn(LapackSrcNotFoundError.__doc__) NOT AVAILABLE Running from scipy source directory. Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users...\AppData\Local\Temp\pip-build-qqtiwqdj\scipy\setup.py", line 415, in <module> setup_package() File "C:\Users...\AppData\Local\Temp\pip-build-qqtiwqdj\scipy\setup.py", line 411, in setup_package setup(**metadata) File "C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\core.py", line 135, in setup config = configuration() File "C:\Users...\AppData\Local\Temp\pip-build-qqtiwqdj\scipy\setup.py", line 335, in configuration config.add_subpackage('scipy') File "C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\misc_util.py", line 1003, in add_subpackage caller_level = 2) File "C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\misc_util.py", line 972, in get_subpackage caller_level = caller_level + 1) File "C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\misc_util.py", line 909, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "scipy\setup.py", line 15, in configuration config.add_subpackage('linalg') File "C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\misc_util.py", line 1003, in add_subpackage caller_level = 2) File "C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\misc_util.py", line 972, in get_subpackage caller_level = caller_level + 1) File "C:\Users...\AppData\Local\Programs\Python\Python35\lib\site-packages\numpy\distutils\misc_util.py", line 909, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "scipy\linalg\setup.py", line 20, in configuration raise NotFoundError('no lapack/blas resources found') numpy.distutils.system_info.NotFoundError: no lapack/blas resources found ---------------------------------------- Command "C:\Users...\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users...\\AppData\\Local\\Temp\\pip-build-qqtiwqdj\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users...\AppData\Local\Temp\pip-p09190cf-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users...\AppData\Local\Temp\pip-build-qqtiwqdj\scipy\ |
20191023、O’REILLYの”Pythonではじめる機械学習”の勉強のため、scipyのインストールに再挑戦。
パッケージのリストを表示させるとpipが最新バージョンではないというWARNING。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
C:\Users\xxxx>python -m pip list Package Version --------------- ------- cycler 0.10.0 kiwisolver 1.1.0 matplotlib 3.1.1 numpy 1.17.1 pip 19.2.3 pyparsing 2.4.2 python-dateutil 2.8.0 setuptools 40.8.0 six 1.12.0 WARNING: You are using pip version 19.2.3, however version 19.3.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. |
pipをアップグレード。
1 2 3 4 5 6 7 8 9 |
C:\...\Python>python -m pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB) |████████████████████████████████| 1.4MB 1.3MB/s Installing collected packages: pip Found existing installation: pip 19.2.3 Uninstalling pip-19.2.3: Successfully uninstalled pip-19.2.3 Successfully installed pip-19.3.1 |
scipyを無事インストール。
1 2 3 4 5 6 7 |
C:\...\Python>python -m pip install scipy Collecting scipy Downloading https://files.pythonhosted.org/packages/e1/9e/454b2dab5ee21f66ebf02ddbc63c5f074b21c44e66e1a509b38566cac9d9/scipy-1.3.1-cp37-cp37m-win32.whl (27.1MB) |████████████████████████████████| 27.1MB 819kB/s Requirement already satisfied: numpy>=1.13.3 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from scipy) (1.17.1) Installing collected packages: scipy Successfully installed scipy-1.3.1 |
そのまま調子に乗って、ipython、scikit-learn、pandas、pillowもインストール。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
C:\...\Python>python -m pip install ipython scikit-learn pandas pillow Collecting ipython Downloading https://files.pythonhosted.org/packages/fb/44/f28a13852e562af719f9de1761680a84a93e8b4c50e22d00d68f60ee2e8b/ipython-7.8.0-py3-none-any.whl (775kB) |████████████████████████████████| 778kB 437kB/s Collecting scikit-learn Downloading https://files.pythonhosted.org/packages/db/c8/5903e8f826f3b1b845942798f4948a817b6334f9601927c0eea09148cd70/scikit_learn-0.21.3-cp37-cp37m-win32.whl (5.2MB) |████████████████████████████████| 5.2MB 3.3MB/s Collecting pandas Downloading https://files.pythonhosted.org/packages/f5/d7/383f1f6ae2cc6b85155a0d8aad9d20bdc21c65ffd74bf1f534ec27716d0b/pandas-0.25.2-cp37-cp37m-win32.whl (7.9MB) |████████████████████████████████| 7.9MB 1.6MB/s Collecting pillow Downloading https://files.pythonhosted.org/packages/4b/88/0a35f7ae1e436309a97c92fec81c1ab7d70b4a0646f39b420cbcecfb2de6/Pillow-6.2.1-cp37-cp37m-win32.whl (1.8MB) |████████████████████████████████| 1.8MB 2.2MB/s Collecting traitlets>=4.2 Downloading https://files.pythonhosted.org/packages/ca/ab/872a23e29cec3cf2594af7e857f18b687ad21039c1f9b922fac5b9b142d5/traitlets-4.3.3-py2.py3-none-any.whl (75kB) |████████████████████████████████| 81kB 2.6MB/s Collecting pickleshare Downloading https://files.pythonhosted.org/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl Collecting pygments Downloading https://files.pythonhosted.org/packages/5c/73/1dfa428150e3ccb0fa3e68db406e5be48698f2a979ccbcec795f28f44048/Pygments-2.4.2-py2.py3-none-any.whl (883kB) |████████████████████████████████| 890kB 3.3MB/s Collecting colorama; sys_platform == "win32" Downloading https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl Collecting jedi>=0.10 Downloading https://files.pythonhosted.org/packages/55/54/da994f359e4e7da4776a200e76dbc85ba5fc319eefc22e33d55296d95a1d/jedi-0.15.1-py2.py3-none-any.whl (1.0MB) |████████████████████████████████| 1.0MB 6.8MB/s Collecting prompt-toolkit<2.1.0,>=2.0.0 Downloading https://files.pythonhosted.org/packages/87/61/2dfea88583d5454e3a64f9308a686071d58d59a55db638268a6413e1eb6d/prompt_toolkit-2.0.10-py3-none-any.whl (340kB) |████████████████████████████████| 348kB 2.2MB/s Collecting decorator Downloading https://files.pythonhosted.org/packages/5f/88/0075e461560a1e750a0dcbf77f1d9de775028c37a19a346a6c565a257399/decorator-4.4.0-py2.py3-none-any.whl Collecting backcall Downloading https://files.pythonhosted.org/packages/84/71/c8ca4f5bb1e08401b916c68003acf0a0655df935d74d93bf3f3364b310e0/backcall-0.1.0.tar.gz Requirement already satisfied: setuptools>=18.5 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from ipython) (40.8.0) Requirement already satisfied: scipy>=0.17.0 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from scikit-learn) (1.3.1) Requirement already satisfied: numpy>=1.11.0 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from scikit-learn) (1.17.1) Collecting joblib>=0.11 Downloading https://files.pythonhosted.org/packages/8f/42/155696f85f344c066e17af287359c9786b436b1bf86029bb3411283274f3/joblib-0.14.0-py2.py3-none-any.whl (294kB) |████████████████████████████████| 296kB 2.2MB/s Collecting pytz>=2017.2 Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB) |████████████████████████████████| 512kB 2.2MB/s Requirement already satisfied: python-dateutil>=2.6.1 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from pandas) (2.8.0) Collecting ipython-genutils Downloading https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl Requirement already satisfied: six in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from traitlets>=4.2->ipython) (1.12.0) Collecting parso>=0.5.0 Downloading https://files.pythonhosted.org/packages/a3/bd/bf4e5bd01d79906e5b945a7af033154da49fd2b0d5b5c705a21330323305/parso-0.5.1-py2.py3-none-any.whl (95kB) |████████████████████████████████| 102kB 3.2MB/s Collecting wcwidth Downloading https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl Installing collected packages: decorator, ipython-genutils, traitlets, pickleshare, pygments, colorama, parso, jedi, wcwidth, prompt-toolkit, backcall, ipython, joblib, scikit-learn, pytz, pandas, pillow Running setup.py install for backcall ... done Successfully installed backcall-0.1.0 colorama-0.4.1 decorator-4.4.0 ipython-7.8.0 ipython-genutils-0.2.0 jedi-0.15.1 joblib-0.14.0 pandas-0.25.2 parso-0.5.1 pickleshare-0.7.5 pillow-6.2.1 prompt-toolkit-2.0.10 pygments-2.4.2 pytz-2019.3 scikit-learn-0.21.3 traitlets-4.3.3 wcwidth-0.1.7 |
20191027、mglearnをインストール。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
C:...>python -m pip install mglearn Collecting mglearn Downloading https://files.pythonhosted.org/packages/fb/01/8d3630ecc767c9de96a9c46e055f2a3a5f9e14a47d3d0348a36a5005fe67/mglearn-0.1.7.tar.gz (540kB) |████████████████████████████████| 542kB 409kB/s Requirement already satisfied: numpy in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from mglearn) (1.17.1) Requirement already satisfied: matplotlib in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from mglearn) (3.1.1) Requirement already satisfied: scikit-learn in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from mglearn) (0.21.3) Requirement already satisfied: pandas in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from mglearn) (0.25.2) Requirement already satisfied: pillow in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from mglearn) (6.2.1) Requirement already satisfied: cycler in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from mglearn) (0.10.0) Collecting imageio Downloading https://files.pythonhosted.org/packages/1a/de/f7f985018f462ceeffada7f6e609919fbcc934acd9301929cba14bc2c24a/imageio-2.6.1-py3-none-any.whl (3.3MB) |████████████████████████████████| 3.3MB 1.3MB/s Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from matplotlib->mglearn) (2.4.2) Requirement already satisfied: kiwisolver>=1.0.1 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from matplotlib->mglearn) (1.1.0) Requirement already satisfied: python-dateutil>=2.1 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from matplotlib->mglearn) (2.8.0) Requirement already satisfied: scipy>=0.17.0 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from scikit-learn->mglearn) (1.3.1) Requirement already satisfied: joblib>=0.11 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from scikit-learn->mglearn) (0.14.0) Requirement already satisfied: pytz>=2017.2 in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from pandas->mglearn) (2019.3) Requirement already satisfied: six in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from cycler->mglearn) (1.12.0) Requirement already satisfied: setuptools in c:\users...\appdata\local\programs\python\python37-32\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->mglearn) (40.8.0) Installing collected packages: imageio, mglearn Running setup.py install for mglearn ... done Successfully installed imageio-2.6.1 mglearn-0.1.7 |