title: Pytest: ModuleNotFoundError: No module named 'src'
body: <p>I'm starting to learn pytest and I want to integrate it with Travis later on. I've created my first tests and I can run them from PyCharm without any problem. But when I try to run pytest from Linux's terminal I get the following error:</p>
  <pre><code>Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  /usr/lib/python3.6/importlib/__init__.py:126: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  test_prob.py:1: in &lt;module&gt;
      from src.agents import prob
  E   ModuleNotFoundError: No module named 'src'
  
  </code></pre>
  <p>I've found some similar problems and solutions for them but none of them have worked for me. <a href="https://i.stack.imgur.com/rgChf.png" rel="nofollow noreferrer">My project structure looks as follow</a></p>