python debug时报:AttributeError: module 'platform' has no attribute 'python_implem

Sky Ye 2020-07-10 05:19:09
如下图所示,在debug脚本时会出现如下错误,但run脚本时一切正常,很诡异的问题,求大侠们help~~
(PS本人平台是Mac OS, pycharm, 之前还一切正常,今天突然发现出现这样的问题。)

/usr/local/bin/python3.8 /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 55292 --file /Users/skyy/MyPython/DataAnalysis/sortTuple.py
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 22, in <module>
from _pydevd_bundle.pydevd_constants import IS_JYTH_LESS25, IS_PYCHARM, get_thread_id, get_current_thread_id, \
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py", line 25, in <module>
IS_CPYTHON = platform.python_implementation() == 'CPython'
AttributeError: module 'platform' has no attribute 'python_implementation'

Process finished with exit code 1

...全文
986 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xjdlg 2022-09-07
  • 打赏
  • 举报
回复

你可能某个模块或者某个代码目录的名字命名成platform了跟系统的platform模块有冲突了,修改成其他名字就行了,见下图,这样就不行。

img

DBC_ 2021-04-08
  • 打赏
  • 举报
回复
请问解决了嘛
Sky Ye 2020-07-10
  • 打赏
  • 举报
回复
自已顶一下,在线等啊~~

37,719

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧