{"id":949,"hash":"a2f434bd76db540c2dbaa5f4052530561c35466adb57272e429cd3d977673eb4","pattern":"Py.test command not found, but library is installed","full_message":"There are already two posts on stack overflow on this topic; however, none of them have resolved or addressed my specific situation.\n\nI have installed pytest via pip install pytest.  I am able to import the library in Python as well.\n\nThe problem is that when I try to use the py.test command in Terminal, I get py.test: command not found.\n\nDoes anyone have any insight as to why I am not able to use the command in the terminal?\n\nEDIT:  It even shows up as an installed package:\n\n$ pip list\ncycler (0.9.0)\nmatplotlib (1.5.1)\nnumpy (1.10.1)\npip (8.1.0)\npy (1.4.31)\npyparsing (2.0.7)\npytest (2.9.0)\npython-dateutil (2.4.2)\npytz (2015.7)\nscipy (0.17.0)\nsetuptools (7.0)\nsix (1.10.0)\ntensorflow (0.5.0)\nvboxapi (1.0)\nwheel (0.26.0)","ecosystem":"pypi","package_name":"terminal","package_version":null,"solution":"using python -m pytest will work for you. \n\nOr if you using virtual environment and installed pytest on virtualenv you should then run py.test alongside your virtual environment.\n\nCheck this website can be useful:http://pythontesting.net/framework/pytest/pytest-introduction/","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/35998992/py-test-command-not-found-but-library-is-installed","votes":78,"created_at":"2026-04-19T04:52:04.242728+00:00","updated_at":"2026-04-19T04:52:04.242728+00:00"}