0
$\begingroup$

Rosanswers logo

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.


Originally posted by JC on ROS Answers with karma: 16 on 2018-01-10

Post score: 0


Original comments

Comment by gvdhoorn on 2018-01-11:
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?

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

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-01-11

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.