在pycharm中打开项目文件
确保安装python环境
此时是使用python3.7版本,没有的话需要添加环境:add interpreter
![](https://img-blog.csdnimg.cn/img_convert/9ed7b0a112004c13b1e74a11d1acb11e.png)
在anaconda(安装参考https://blog.csdn.net/m0_67357141/article/details/123633490)中选择基础环境(base),也可以选择envs文件夹下新建的环境
2021版的界面如下,2022版的略有改动
![](https://img-blog.csdnimg.cn/img_convert/a5d328ac0682554655593b96d89a772d.png)
设置好环境后,点运行启动,如果按钮为灰色,则可通过右键运行run xxx
![](https://img-blog.csdnimg.cn/img_convert/9d484715f4c942ef6dd521339c635653.png)
3.设置命令行参数
右键运行文件,选择配置,可以设置命令行参数,格式--参数名称1 参数值1 --参数名称2 参数值2
![](https://img-blog.csdnimg.cn/img_convert/b9f3bf8619b3647e9d3c611fc6a058ee.png)
![](https://img-blog.csdnimg.cn/img_convert/3583fff45afa0266bb0196696d5f83dd.png)
4.debug
在main中想要停止的语句前打个红点,选择debug模式运行
![](https://img-blog.csdnimg.cn/img_convert/a4e9960fc909658c5f5bd1f3ad21e1e5.png)
往下继续运行一行代码;跳入此行所涉及的函数;跳到下一个断点
5.解决报错
可以在github中找到源码,查看issues