1、Python 執行
python ingest_tmdb_from_file.py
提示如下
Traceback (most recent call last):
File "ingest_tmdb_from_file.py", line 1, in <module>
import requests
ImportError: No module named requests
2、通過搜索得知缺少requests包
3、安裝
方式1:
pipenv install requests
提示 ,可能是網絡問題
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10b943990>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/requests/
Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests
方式2:pip install requests -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
安裝成功
不過執行 以下命令任然有問題
python ingest_tmdb_from_file.py
方式3:經過反覆嘗試排查,由於本機安裝了brew,管理安裝包的方式,存在多個python的版本2和3
因此採用python2的命令方式執行
python2 ingest_tmdb_from_file.py