原文:解决AttributeError: 'module' object has no attribute 'main' 安装第三方包报错

.找到pycharm 目录下的 helper packaging tool.py 文件 .用新版pycharm 的packaging tool.py 替换 旧版 同名文件 文件代码如下: import sys import traceback import getopt import os ERROR WRONG USAGE ERROR NO PIP ERROR NO SETUPTOOLS ER ...

2018-09-10 16:02 0 5188 推荐指数:

查看详情

AttributeError: module '__main__' has no attribute 'main'解决方法

在终端运行.py文件时报错AttributeError: module '__main__' has no attribute 'main' 原因:在PyCharm里运行python程序需要添加 但是直接用python命令行运行时无法识别出该函数头,删除该函数所有内容即可! ...

Sat Jan 05 02:32:00 CST 2019 0 3244
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM