I've installed pytest for python testing, but I get
No such file or directory error when simply trying to run it from a project folder.
It's in a location that should be accessible through the
PATH variable, but (to the best of my ability to describe the problem) isn't being 'found'. For some reason when I type 'pytest' my shell is looking to the wrong location; if I specify the location then pytest will run fine.
kirk@kirk:~/develop/foo$ pytest bash: /usr/bin/pytest: No such file or directory
It's actually in
/usr/local/bin, which is part of the path, and works when I explicitly call that location.
kirk@kirk:~/develop/foo$ whereis pytest pytest: /usr/local/bin/pytest kirk@kirk:~/develop/foo$ echo $PATH /home/kirk/bin:/home/kirk/.local/bin:/usr/local/sbin:/usr/local/bin: /usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin kirk@kirk:~/develop/foo$ /usr/local/bin/pytest ============================= test session starts ============================== platform linux2 -- Python 2.7.12, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 rootdir: /home/kirk/develop/foo, inifile: pytest.ini collected 0 items ========================= no tests ran in 0.00 seconds =========================
What can cause this behavior?