When I enter
python --version
it gives:
bash: python: command not found
but when I enter
sudo apt-get install python
it gives:
python is already the newest version (2.7.16-1).
When trying to locate the python files, they appear mostly in /var/lib/dpkg/info/ or in /home/pi/.local/bin/, therefore are present in the system, however they do not appear where they would normally be found in /usr/local/bin.
The same thing goes for the pip, python3 and pip3 files.
How do I fix this so that I can use the python command?
To install python to the newest version run sudo apt-get install python3
You then need to run python3 for linux based systems so python3 --version should work.
Python installed on raspberry pi, but not accessible in /usr/local/bin