mapconcierge / til

TIL - Today I Learned
Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

MacOS 10.15 Catalina に Python3 インストールするときのメモ #9

Open mapconcierge opened 3 years ago

mapconcierge commented 3 years ago

https://oku.edu.mie-u.ac.jp/~okumura/python/install.html

mapconcierge commented 3 years ago

Python 3.9 インストーラをダウンロードしインストール

https://www.python.org/downloads/

特に問題なし。

mapconcierge commented 3 years ago

$ vi .bash_profile コマンドを叩いて

.bash_profile に

スクリーンショット 2021-01-19 9 44 48

と書かれていることを確認。

プロファイルを実行 $ . ~/.bash_profile

mapconcierge commented 3 years ago

$ alias python=/usr/local/bin/python3

スクリーンショット 2021-01-19 12 43 53

$ alias pip=/usr/local/bin/pip3

でエイリアス変更

mapconcierge commented 3 years ago

インストール先が /usr/bin/python3 と /user/local/bin/python3 のどちらかを確認するのが大事。

mapconcierge commented 3 years ago

geocoder をPIPでインストール $ pip install geocoder

Collecting geocoder
  Using cached geocoder-1.38.1-py2.py3-none-any.whl (98 kB)
Collecting ratelim
  Using cached ratelim-0.1.6-py2.py3-none-any.whl (4.0 kB)
Collecting click
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting requests
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting future
  Downloading future-0.18.2.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 3.5 MB/s 
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting decorator
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet<5,>=3.0.2
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Using legacy 'setup.py install' for future, since package 'wheel' is not installed.
Installing collected packages: decorator, ratelim, click, urllib3, idna, certifi, chardet, requests, future, six, geocoder
    Running setup.py install for future ... done
Successfully installed certifi-2020.12.5 chardet-4.0.0 click-7.1.2 decorator-4.4.2 future-0.18.2 geocoder-1.38.1 idna-2.10 ratelim-0.1.6 requests-2.25.1 six-1.15.0 urllib3-1.26.2
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip' command.

$ pip install googlemaps

Collecting googlemaps
  Downloading googlemaps-4.4.2.tar.gz (29 kB)
Requirement already satisfied: requests<3.0,>=2.20.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from googlemaps) (2.25.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from requests<3.0,>=2.20.0->googlemaps) (1.26.2)
Requirement already satisfied: idna<3,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from requests<3.0,>=2.20.0->googlemaps) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from requests<3.0,>=2.20.0->googlemaps) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from requests<3.0,>=2.20.0->googlemaps) (4.0.0)
Using legacy 'setup.py install' for googlemaps, since package 'wheel' is not installed.
Installing collected packages: googlemaps
    Running setup.py install for googlemaps ... done
Successfully installed googlemaps-4.4.2
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip' command.

$ /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip Collecting pip

Downloading pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 4.7 MB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
Successfully installed pip-20.3.3