python:python_install

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン両方とも次のリビジョン
python:python_install [2020/02/17 18:11] – [Python 2.7/3.8 の共存] ともやんpython:python_install [2020/04/10 10:22] ともやん
行 2: 行 2:
   <style>   <style>
     #result pre {     #result pre {
-      height: 200px; 
       overflow: scroll;       overflow: scroll;
       overflow-x: hidden;       overflow-x: hidden;
 +      font-size: 10px;
 +    }
 +    #result_long pre {
 +      height: 400px;
 +      overflow: scroll;
 +      overflow-x: hidden;
 +      font-size: 10px;
     }     }
   </style>   </style>
行 18: 行 24:
  
 ===== Windows 編 ===== ===== Windows 編 =====
 +
 +==== Scoop によるインストール ====
 +[[windows:scoop|Scoop]] をインストールする。\\
 +ダウンロード元として **versions** バケットを追加する。\\
 +<code>
 +$ scoop bucket add versions
 +</code>
 +<WRAP prewrap 100% #result>
 +<code>
 +Checking repo... ok
 +The versions bucket was added successfully.
 +</code>
 +</WRAP>
 +
 +**python**、**python27** をインストールする。\\
 +<code>
 +$ scoop install python python27
 +</code>
 +<WRAP prewrap 100% #result_long>
 +<code>
 +Installing 'lessmsi' (1.6.91) [64bit]
 +lessmsi-v1.6.91.zip (495.0 KB) [==============================================================================] 100%
 +Checking hash of lessmsi-v1.6.91.zip ... ok.
 +Extracting lessmsi-v1.6.91.zip ... done.
 +Linking ~\scoop\apps\lessmsi\current => ~\scoop\apps\lessmsi\1.6.91
 +Creating shim for 'lessmsi'.
 +Creating shortcut for Less MSIérables (lessmsi-gui.exe)
 +'lessmsi' (1.6.91) was installed successfully!
 +Installing 'dark' (3.11.2) [64bit]
 +dark-3.11.2.zip (3.5 MB) [====================================================================================] 100%
 +Checking hash of dark-3.11.2.zip ... ok.
 +Extracting dark-3.11.2.zip ... done.
 +Linking ~\scoop\apps\dark\current => ~\scoop\apps\dark\3.11.2
 +Creating shim for 'dark'.
 +'dark' (3.11.2) was installed successfully!
 +Installing 'python' (3.8.2) [64bit]
 +install-pep-514.reg (555 B) [=================================================================================] 100%
 +Checking hash of install-pep-514.reg ... ok.
 +
 +uninstall-pep-514.reg (86 B) [================================================================================] 100%
 +Checking hash of uninstall-pep-514.reg ... ok.
 +python-3.8.2-amd64.exe (26.3 MB) [============================================================================] 100%
 +Checking hash of python-3.8.2-amd64.exe ... ok.
 +Running pre-install script...
 +Running installer script...
 +Linking ~\scoop\apps\python\current => ~\scoop\apps\python\3.8.2
 +Creating shim for 'python'.
 +Creating shim for 'pythonw'.
 +Creating shim for 'python3'.
 +Creating shim for 'idle'.
 +Creating shim for 'idle3'.
 +'python' (3.8.2) was installed successfully!
 +Notes
 +-----
 +Allow applications and third-party installers to find python by running:
 +"C:\Users\tomoyan\scoop\apps\python\current\install-pep-514.reg"
 +Installing 'python27' (2.7.17) [64bit]
 +python-2.7.17.amd64.msi (19.6 MB) [===========================================================================] 100%
 +Checking hash of python-2.7.17.amd64.msi ... ok.
 +Extracting python-2.7.17.amd64.msi ... done.
 +Linking ~\scoop\apps\python27\current => ~\scoop\apps\python27\2.7.17
 +Creating shim for 'python'.
 +WARN  Overwriting shim to python.exe installed from python
 +Creating shim for 'pythonw'.
 +WARN  Overwriting shim to pythonw.exe installed from python
 +Creating shim for 'python2'.
 +Creating shim for 'idle'.
 +WARN  Overwriting shim to idle.bat installed from python
 +Creating shim for 'idle2'.
 +Running post-install script...
 +DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
 +Looking in links: c:\users\tomoyan\appdata\local\temp\tmp1m0br9
 +Collecting setuptools
 +Collecting pip
 +Installing collected packages: setuptools, pip
 +Successfully installed pip-19.2.3 setuptools-41.2.0
 +'python27' (2.7.17) was installed successfully!
 +</code>
 +</WRAP>
 +
 +**python** の動作確認。\\
 +<code>
 +$ python -VV
 +</code>
 +<WRAP prewrap 100% #result>
 +<code>
 +Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
 +</code>
 +</WRAP>
 +
 +**python 2.7** へ切り替え。\\
 +<code>
 +$ scoop reset python27
 +</code>
 +<WRAP prewrap 100% #result>
 +<code>
 +Resetting python27 (2.7.17).
 +Linking ~\scoop\apps\python27\current => ~\scoop\apps\python27\2.7.17
 +Creating shim for 'python'.
 +Creating shim for 'pythonw'.
 +Creating shim for 'python2'.
 +Creating shim for 'idle'.
 +Creating shim for 'idle2'.
 +</code>
 +</WRAP>
 +
 +<code>
 +$ python -VV
 +</code>
 +<WRAP prewrap 100% #result>
 +<code>
 +Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
 +</code>
 +</WRAP>
 +
 +
 +==== Python 公式よりダウンロード ====
   - [[https://www.python.org/|Welcome to Python.org]]の[[https://www.python.org/downloads/|Download Python | Python.org]]より最新バージョンをダウンロードしてくる。(ここでは [[https://www.python.org/ftp/python/3.8.1/python-3.8.1-amd64.exe|python-3.8.1-amd64.exe]] を使用する。)   - [[https://www.python.org/|Welcome to Python.org]]の[[https://www.python.org/downloads/|Download Python | Python.org]]より最新バージョンをダウンロードしてくる。(ここでは [[https://www.python.org/ftp/python/3.8.1/python-3.8.1-amd64.exe|python-3.8.1-amd64.exe]] を使用する。)
   - ダウンロードした python-3.8.1-amd64.exe を実行して、[Customize installation] をクリックする。   - ダウンロードした python-3.8.1-amd64.exe を実行して、[Customize installation] をクリックする。
行 203: 行 326:
 Python 3.2.3 Python 3.2.3
 </code> </code>
 +
 +===== 参考文献 =====
 +[[https://github.com/lukesampson/scoop/wiki/Switching-Ruby-And-Python-Versions|Switching Ruby and Python Versions · lukesampson/scoop Wiki]]\\
  
  • python/python_install.txt
  • 最終更新: 2020/09/11 16:59
  • by ともやん