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

前端 未结 11 1696
星月不相逢
星月不相逢 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:48

    If you have a script with the same name as your module in another directory, it will use that instead. For example:

    module.py
    
    module
    |
    |--module
    |  |
    |  |--__init__.py
    |  |--module.py
    

    This will make it so that the first module.py is being used, not the second one.

提交回复
热议问题