usrname:~$ roscore
Command 'roscore' not found, but can be installed with:
sudo apt install python-roslaunch
/usr/bin/python 链接指向python3或者anaconda环境的python导致
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2
更改链接即可