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
)
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?
As it was pointed out by @bouteillebleu the issue was in pytest-metadata package.
The solution was to upgrade the package
pip install --upgrade pytest-metadata
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With