Pytest not loading

pytest -m connection

Traceback (most recent call last):
File “C:\Users\hi\anaconda3\Scripts\pytest-script.py”, line 6, in
from py.test import console_main
ImportError: cannot import name ‘console_main’ from ‘pytest’ (unknown location)