1、汉字注释报错原因
报错:SyntaxError: Non-ASCII character

解决方案:# -- coding: UTF-8 --放在代码的第一行

2、pycharm调整字体大小
file——>settings——>colors & fonts——>font——>size

3、更换Python版本后,在pycharm中设置Python的执行环境
这个问题解决的是卸载了原有的2.7Python版本安装为3.7版本,执行.py文件报错
file——>setting——>project interpreter——>选择Python的运行环境


4、No module named 'requests'

解决方案:cmd打开控制台,输入python -m pip install requests命令

再次运行.py文件

5、No module named 'selenium'
1、打开命令行输入pip install selenium

2、输入from selenium import webdriver回车后是否报错,没报错则说明成功安装selenium包

网友评论