import error: 'No module named' *does* exist

前端 未结 11 1663
星月不相逢
星月不相逢 2020-11-29 04:30

I am getting this stack trace when I start pyramid pserve:

% python $(which pserve) ../etc/development.ini
Traceback         


        
11条回答
  •  执念已碎
    2020-11-29 04:56

    I had the same issue. I solved it by running the command in a different python version. I tried python3 filename.py. Earlier i was using Python 2.7.

    Another possibility is that the file from which something is imported may contain BOM (Byte Order Mark). It can be solved by opening the file in some editor which supports multiple encoding like VSCode (Notepad++) and saving in a different encoding statndard like ANSI, UTF-8(without BOM).

提交回复
热议问题