[ros-users] Installation stuck on Redhat 2.6 (ImportError: No module named yaml)

Ken Conley kwc at willowgarage.com
Wed Jun 16 23:04:35 UTC 2010


/usr/bin/env python is the correct way of doing it. The fact that you
had to change it means that you have two pythons on your system, and
the default python is not the one in /usr/bin/python.
"/usr/bin/python" is considered brittle and incorrect, as python can
be installed in many different locations. "/usr/bin/env python" runs
the python according to your $PATH.

 - Ken

On Wed, Jun 16, 2010 at 3:35 PM, Isao Isaac Saito
<130s at 2000.jukuin.keio.ac.jp> wrote:
> As a result, I successfully installed ROS on Redhat 2.6 on my robot.
>
> I get similar error saying "ImportError: No module named yaml" a few
> times during the installation process. In each case I modified
> indicated .py file as follows.
>
> At line 1,
> Original: #!/usr/bin/env python
> Modified: #!/usr/bin/python
>
> I'm not sure if the modified version follows the python's rule, but at
> least it worked for me.
>
> Thanks all who thought about this issue!
>
> So I'm nost sure if it's better to file a bug report, and I don't even
> know how to do that. If anyone tells this should be reported and how
> to do it, I'm pleased to do it.
>
> Isaac
>
>
> On Tue, Jun 15, 2010 at 9:55 PM, Ken Conley <kwc at willowgarage.com> wrote:
>> rosinstall uses:
>>
>> #!/usr/bin/env python
>>
>> If you encounter scripts using /usr/bin/python, please file a bug report.
>>
>>  - Ken
>>
>> On Tue, Jun 15, 2010 at 7:52 PM, Eric Perko <wisesage5001 at gmail.com> wrote:
>>>
>>> You should also check this with `/usr/bin/python` as well as `python`.
>>> I saw a problem on Mac OS X a while back that was similar due to some
>>> of the ROS scripts using `/usr/bin/python` and not `/usr/bin/env
>>> python`, which caused then to use the wrong version of python. This
>>> gave me a similar type of error - yaml was installed, I could load it
>>> up using the python interpreter, but none of ROS could find it.
>>>
>>> Hope that helps.
>>>
>>> - Eric
>>>
>>> On Tue, Jun 15, 2010 at 10:47 PM, Ken Conley <kwc at willowgarage.com> wrote:
>>> > Alright, it does look like you have a PyYAML install there, question is
>>> > why
>>> > it's not being found.
>>> >
>>> > One more thing to try :
>>> >
>>> > python --version
>>> > python -c "import yaml; print yaml"
>>> >
>>> >  - Ken
>>> >
>>> > On Tue, Jun 15, 2010 at 7:37 PM, Isao Isaac Saito
>>> > <130s at 2000.jukuin.keio.ac.jp> wrote:
>>> >>
>>> >> Ken,
>>> >>
>>> >> thanks. Here is the result after I tried to run installation for
>>> >> PyYAML.
>>> >>
>>> >> <quote>
>>> >> [robot at localhost ~]$ sudo yum install wget cmake PyYAML
>>> >> [sudo] password for robot:
>>> >> Setting up Install Process
>>> >> Package wget-1.12-2.fc11.i586 already installed and latest version
>>> >> Package cmake-2.6.4-3.fc11.i586 already installed and latest version
>>> >> Package PyYAML-3.08-4.fc11.i586 already installed and latest version
>>> >> Nothing to do
>>> >> </quote>
>>> >>
>>> >> Btw, python is ver 2.6.2.
>>> >>
>>> >> Isaac
>>> >> Heracleia lab at UT-Arlington
>>> >>
>>> >>
>>> >> On Tue, Jun 15, 2010 at 9:23 PM, Ken Conley <kwc at willowgarage.com>
>>> >> wrote:
>>> >> > Isaac,
>>> >> >
>>> >> > It appears PyYAML did not install correctly. What happens when you
>>> >> > run:
>>> >> >
>>> >> > sudo yum install wget cmake PyYAML
>>> >> >
>>> >> > (I'm not a Fedora expert, but that's the line in the install page)
>>> >> >
>>> >> >  - Ken
>>> >> >
>>> >> > On Tue, Jun 15, 2010 at 7:21 PM, Isao Isaac Saito
>>> >> > <130s at 2000.jukuin.keio.ac.jp> wrote:
>>> >> >>
>>> >> >> Hi all,
>>> >> >>
>>> >> >> I am stuck at and getting error message below. I'm assuming this is
>>> >> >> resulting in pythonpath setting but I'm not sure since I'm new to it
>>> >> >> yet. I appreciate if anyone gives me an idea.
>>> >> >>
>>> >> >> - Phenomenon
>>> >> >> <quote>
>>> >> >> % ~/rosinstall ~/ros
>>> >> >> http://ros.org/rosinstalls/boxturtle_base.rosinstall
>>> >> >> Traceback (most recent call last):
>>> >> >>  File "/home/robot/rosinstall", line 25, in <module>
>>> >> >>    import yaml # 10Jun15/Isao; rosnstall still stuck here
>>> >> >> ImportError: No module named yaml
>>> >> >> </quote>
>>> >> >>
>>> >> >> - Environement
>>> >> >> Redhat Linux version 2.6.29.4
>>> >> >> gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
>>> >> >> Type of ROS: I'm referring to "Fedora 11 Installation Instructions"
>>> >> >> (http://www.ros.org/wiki/ROS/Installation/Fedora)
>>> >> >> # Using Redhat 2.6 is required the robot
>>> >> >>
>>> >> >> - Workaround tried (all of these didn't have effect)
>>> >> >> W-1. Copy /usr/lib/python2.6/site-packages/yaml/cyaml.py* to
>>> >> >> %HOME_PYTHON%/ . Modify rosinstall to "import cyaml"
>>> >> >> W-2. Copy /usr/share/doc/PyYAML-3.08/examples/pygments-lexer/yaml.py
>>> >> >> to %HOME_PYTHON%/
>>> >> >>
>>> >> >> - Result of "locate yaml"
>>> >> >> https://docs.google.com/View?id=dfcq779r_271f5bt6gff
>>> >> >>
>>> >> >> Best regards,
>>> >> >> Isaac
>>> >> >> _______________________________________________
>>> >> >> ros-users mailing list
>>> >> >> ros-users at code.ros.org
>>> >> >> https://code.ros.org/mailman/listinfo/ros-users
>>> >> >
>>> >> >
>>> >> > _______________________________________________
>>> >> > ros-users mailing list
>>> >> > ros-users at code.ros.org
>>> >> > https://code.ros.org/mailman/listinfo/ros-users
>>> >> >
>>> >> >
>>> >> _______________________________________________
>>> >> ros-users mailing list
>>> >> ros-users at code.ros.org
>>> >> https://code.ros.org/mailman/listinfo/ros-users
>>> >
>>> >
>>> > _______________________________________________
>>> > ros-users mailing list
>>> > ros-users at code.ros.org
>>> > https://code.ros.org/mailman/listinfo/ros-users
>>> >
>>> >
>>> _______________________________________________
>>> ros-users mailing list
>>> ros-users at code.ros.org
>>> https://code.ros.org/mailman/listinfo/ros-users
>>
>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list