1.python -m pip 和 pip安装的区别:
python -m pip :可以区分python版本进行安装;切换到某个python安装路径下,执行python.exe -m pip进行安装;
python.exe -m pip install requests
2. --user 为当前用户安装,安装路径在%APPDATA%
--user Install to the Python user install directory for your platform. Typically ~/.local/, or
%APPDATA%Python on Windows. (See the Python documentation for site.USER_BASE for full
details.)
3.使用固定源安装,官方的速度太慢,使用其他源进行下载,如清华镜像,requests是需要安装的包;
python.exe -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host https://pypi.tuna.tsinghua.edu.cn requests