本内容遵循CC 4.0 BY-SA版权协议 No module named 'requests' ——这行红字,但凡写过几天Python的人,大概率都见过。它出现的场景往往极其气人:你明明在终端里敲过 pip install requests ,命令行里 import requests 跑得好好的,结果一打开PyCharm,运行同一个脚本,红字照旧。
The Python Requests module is a popular alternative to the standard library's HTTP handling (e.g. urllib2). Kenneth Reitz, who is the "benevolent dictator for life" (BDFL) for Requests, came to the ...
还是报 module not found 错误,装是装上了,又没完全装上,何哉?(以 requests 这个库为例子) 原因是,没有处理认识好 python 多版本共存问题,cmd 里装 requests 的 python 环境不是你 pycharm 里面运行的那个 python 环境。 在 cmd 输入 pip install requests 前,不妨先输入一个 ...