I am getting ImportError: No module named _pluggy
error when running tests using pytest.
Then I tried installing pluggy using pip install pluggy
. It installs pluggy==0.6.0
successfully, but is still giving the error.
Versions List (From running pip freeze | grep pytest
)
- pytest==3.3.1
- pytest-cov==2.5.1
- pytest-metadata==1.5.0
- pytest-runner==3.0
- pluggy==0.6.0
- Python 2.7.12
Shown below is the stack trace
Tests run successfully when run in a virtualenv. What are the possible causes which can cause this error in a non-virtualenv environment?