When I execute:
echo $PYTHONPATH on command line I get the following output:
/home/nehal/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/nehal/anaconda3/lib/python3.6/site-packages:/home/nehal/anaconda3/lib/python3.6/dist-packages:/home/nehal/anaconda3/lib/python3.6/dist-packages:/home/nehal/anaconda3/lib/python3.6/dist-packages:/home/nehal/anaconda3/lib/python3.5/dist-packages:/home/userx/anaconda3/lib/python3.5/dist-packages:/home/userx/anaconda3/lib/python3.5/dist-packages:/home/userx/anaconda3/lib/python3.5/dist-packages I looked into .bashrc file and found only one PYTHONPATH set
export PYTHONPATH="/home/nehal/anaconda3/lib/python3.6/site-packages:$PYTHONPATH" I also looked into .profile, /etc/environment and /etc/profile but nowhere could I find PYTHONPATH.
My question is where did the above extra paths come from?
FILESsectionman bash, check it for list of files, but please note that it could change from distro to distrodist-packages, andsite-packagesdirectories? Those are probably from when you installed ros and anaconda3. Check and see what other files you are sourcing in your .bashrc.bash_profile?.bashrc.