美文网首页
初次使用vs code调试python经验(失败了)

初次使用vs code调试python经验(失败了)

作者: 空灵一月 | 来源:发表于2019-11-08 12:51 被阅读0次

记录下使用vs code跑python遇到的坑

1、装了很多个python sdk。致命的是在环境变量了还配了多个python的PATH,导致pip install 好好的,可跑起程序来却老找不到包。

  • 对于新手,删除多余的python版本,就留最新的3.7的。
  • 使用pip3 install来装包。
  • 将环境变量里的python PATH清理一下,最后只留一个。

2、vs code没有配置解释器(Interpreter)

  • 在vs code安装完python插件后,ctrl+shift+p,然后选择Python: Select Interpreter(如果出现“no Interpreter found”,最后重启一下),选择一个你安装的python路径。

3、一些莫名其妙的错误

  • RequestsDependencyWarning: urllib3 (1.25.6) or chardet (3.0.4) doesn't match a supported version!解决方法在
pip3 uninstall urllib3
pip3 uninstall chardet
pip3 install --upgrade requests

4、'chromedriver' executable needs to be in PATH


后记,不想弄vs code,debug搞不定,还是用PyCharm吧。

相关文章

网友评论

      本文标题:初次使用vs code调试python经验(失败了)

      本文链接:https://www.haomeiwen.com/subject/pxtbbctx.html