从书上看到用pip install XXX 就可以直接安装模块。下面就是具体操作
1.添加环境变量D:\Python\Scripts\pip.exe
2.打开cmd切换到python安装目录
3.pip install requests
4.打开Pycharm,运行import requests
中间遇到的问题以及对应的办法
Error1: twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
解决办法:pip install PyHamcrest
Error2:You are using pip version 10.0.1, however version 20.0.2 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip‘ command.
解决办法:python -m pip install --upgrade pip(前提是先要删除lib\site-packages (10.0.1) 中的pip-10.0.1.dist-info删除)
wisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
原文:https://www.cnblogs.com/wanglun1101/p/12370129.html