ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

source ~/.bashrc issue at install

asked 2018-01-10 18:13:51 -0500

JC gravatar image

updated 2018-01-28 03:16:06 -0500

gvdhoorn gravatar image

Hi everyone, quick question, I am sure I will sound dumb, but I prefer to ask as I am starting with ROS. When I run source ~/.bashrc I have the errors below.... Can anyone help me understnad what is going on?

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007fbeeae58700 (most recent call first):
bash: /home/jice/cws_oroca/devel/setup.bash: No such file or directory
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007f6bcd48c700 (most recent call first):
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007f3056bb0700 (most recent call first):
jice@jice-System-Product-Name:~$ clear

jice@jice-System-Product-Name:~$ source ~/.bashrc
ROS_DISTRO was set to 'kinetic' before. Please make sure that the environment does not mix paths from different distributions.
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007f2fd4c55700 (most recent call first):
ROS_DISTRO was set to 'lunar' before. Please make sure that the environment does not mix paths from different distributions.
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007fd0e1165700 (most recent call first):
bash: /opt/ros/indigo/setup.bash: No such file or directory
bash: /home/jice/catkin_ws_oroca/devel/setup.bash: No such file or directory
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007f23e6f9e700 (most recent call first):
bash: /home/jice/cws_oroca/devel/setup.bash: No such file or directory
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Current thread 0x00007f9eb7f46700 (most recent call first):
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

Edit: I am trying to remove all of these, thanks for the help, last idea is to reinstall Ubuntu from 0.

edit retag flag offensive close merge delete

Comments

1

Can you tell us a bit more about your computer? OS (version, how installed, etc)? CPU architecture? How did you install ROS? What Python interpreter do you have installed? Are you using bash, or some other shell?

gvdhoorn gravatar image gvdhoorn  ( 2018-01-11 02:47:49 -0500 )edit

Hi, I am using Ubuntu 16.04, I installed ROS via the info on the wiki here: http://wiki.ros.org/kinetic/Installat... , but I am sure I did something wrong (was couple of months ago). As well I have Python 3 installed with Anaconda

JC gravatar image JC  ( 2018-01-27 23:30:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-11 03:14:26 -0500

There seem two be a few different errors in the output you've posted. What version of ROS are you using and have you installed several versions at the same time?

Your .bashrc script is trying to execute a package setup script /home/jice/cws_oroca/devel/setup.bash but it can't find it at that location. If you check what the actual location is and correct your .bashrc then it should fix the first error.

It's also trying to run /opt/ros/indigo/setup.bash and its failing it find it which looks like you were using indigo but you've upgraded and not changed the path for this file in .bashrc

There also seems to be a problem with your python install, or you're trying to use a python library encodings that is not installed, or if it is then the path to its location has not been added to the PYTHONPATH environment variable.

Hope this helps.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-01-10 18:13:51 -0500

Seen: 796 times

Last updated: Jan 28 '18