I will appreciate it if anybody can tell me what's wrong here
Thanks in advance :)
Even I had the same issue and guess what? You have used sudo to install packages from sanp. So run your cmd using sudo. And see if its help let us know.
sudo
sanp