ImportError: No module named when module is there

后端 未结 4 654
名媛妹妹
名媛妹妹 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:16

    Make sure you have __init__.py file in all your package folders so that you tructure looks like

    /python_lib
       Makefile
       /qe
          /tests
             test_web_events.py
          /util
             __init__.py                <------------ create this file
             scratchstore.py
          /trinity
          __init__.py
    

    and then the you cd to python_lib folder and run ``export PYTHONPATH=`pwd```

提交回复
热议问题