No module named dateutil.parser

asked 2017-06-19 05:16:01 -0500

Elric gravatar image

updated 2017-06-19 05:38:25 -0500

I'm trying to install ROS in a CentOS 7.0. I did these steps:

sudo yum install python-rosdep
sudo pip install rosinstall-generator
sudo yum install python-wstool python-rosinstall @buildsys-build
rosinstall_generator desktop_full --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-full-wet.rosinstall

But when I did the following:

 [me@localhost ros_catkin_ws]$  wstool init -j8 src kinetic-desktop-full-wet.rosinstall

And I get:

ERROR: Cannot find required rosinstall library version, check your installation (also of vcstools) is up-to-date. One frequent cause is that rosinstall 0.5 is still installed in /usr/local/lib.
No module named dateutil.parser

I have tried this:

[me@localhost ros_catkin_ws]$ python -c "import rosinstall; print rosintall.__version__"

And I get:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/rosinstall/__init__.py", line 33, in <module>
    import wstool.helpers
  File "/usr/lib/python2.7/site-packages/wstool/helpers.py", line 37, in <module>
    from wstool.config_elements import SetupConfigElement
  File "/usr/lib/python2.7/site-packages/wstool/config_elements.py", line 39, in <module>
    from vcstools.vcs_abstraction import get_vcs_client
  File "/usr/lib/python2.7/site-packages/vcstools/__init__.py", line 44, in <module>
    from vcstools.svn import SvnClient
  File "/usr/lib/python2.7/site-packages/vcstools/svn.py", line 48, in <module>
    import dateutil.parser  # For parsing date strings
ImportError: No module named dateutil.parser

By the way /usr/local/lib is empty.

Any idea about this error?

I also run:

[me@localhost ros_catkin_ws]$ python -c "import dateutil"

With the error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named dateutil
edit retag flag offensive close merge delete

Comments

No module named dateutil.parser

Looks like dateutil (Python module) is not installed, or it doesn't have the parser sub module on CentOS. Can you run python in a bash session and then try import dateutil? That should tell you whether it is installed / usable.

gvdhoorn gravatar imagegvdhoorn ( 2017-06-19 05:34:14 -0500 )edit

@gvdhoorn I run it and I get ImportError: No module named dateutil.

Elric gravatar imageElric ( 2017-06-19 05:38:44 -0500 )edit
1

Well that would seem to suggest that dateutil is not installed at all.

Fix for now: install the datutil package. I don't know what it is called on CentOS.

And then ideally report the fact that dateutil is not listed as a dependency of these tools.

gvdhoorn gravatar imagegvdhoorn ( 2017-06-19 14:13:00 -0500 )edit