ModuleNotFoundError error with PyCharm project folder recs

前端 未结 3 1993
别跟我提以往
别跟我提以往 2020-12-23 18:02

I am working on a project in PyCharm. The project has the following structure:

/projectRoot/
   folder1/
       somecode.py
   utils/
       __init__.py
            


        
3条回答
  •  无人及你
    2020-12-23 18:22

    Similar error here and this appears to be working for me:

    Make sure Project Interpreter is set to, for example: C:\Python36\python.exe (in my case) and not a copy somewhere or another.

    'File > Settings > Project ____ > Project Interpreter'

    Or, long story short, if that route isn't cooperating, can also try finding workspace.xml and manually change SDK_HOME before starting PyCharm:

提交回复
热议问题