Problem Description
Use PyCharm
open project to run, appearImportError: cannot import name 'parse_args' from 'parser' (unknown location)
Traceback (most recent call last):
File "C:\Users\1\Desktop\LightGCL-main\main.py", line 11, in <module>
from parser import parse_args
ImportError: cannot import name 'parse_args' from 'parser' (unknown location)
Cause Analysis:
The error code is in from parser import parse_args
this sentence. The reason for this problem is that the parser
library has the same name. I customized a parser.py
file to import this file, but there is also a parser
package installed in my environment. The default import is in the environment parser
, so naturally I can’t find it. to the class function I defined.
solution:
parser.py
Rename the custom