ImportError: No module named when module is there

后端 未结 4 653
名媛妹妹
名媛妹妹 2021-01-15 01:52

I usually run python2 but I am playing with python3. Right now I am confused as to why I am getting this error.

When I run the command ./test_web_events.py

4条回答
  •  臣服心动
    2021-01-15 02:37

    Just #!/usr/bin/env python add this to your all scripts. Make sure it's on the top.Like;

    #!/usr/bin/env python
    import qe
    

    I assume you added Python 3 to path, if you did, the only problem is this. You do not need init.py or sys.path or anything. This line already finding Python path automatically if you added Python 3 to path, if Python 2 still on the path then it's normal you got error.

提交回复
热议问题