Ask Your Question
0

AttributeError: 'module' object has no attribute 'main'

asked 2011-12-03 22:51:47 -0500

mike6426 gravatar image mike6426
1 1 1 2

updated 2012-03-16 20:23:57 -0500

Kevin gravatar image Kevin flag of United States
2375 40 69 100
http://www.ros.org/

I installed ROS via the instructions on installing on Mac OSX with no errors during installation. I need ROS to work with Python 3.2.2 (it needs to integrate with MORSE and therefore with Blender, and they both use 3.2.2), so I fixed all of the generic print statements needing parentheses, but then I get to this error. I've uninstalled and reinstalled, as well as the ever typical rebooting, and it is still not fixed.

Traceback (most recent call last): File "/Users/o2wtf2o/ros/ros/bin/roscore", line 36, in <module> roslaunch.main(['roscore', '--core']+sys.argv[1:]) AttributeError: 'module' object has no attribute 'main'

edit retag flag offensive close delete

Comments

FYI: you still need to run the ROS command-line tools with Python 2. The MORSE/Blender fixes only apply the the underlying communication libraries. Thus, run MORSE with Py3k, run ROS with Python 2.

kwc ( 2012-02-20 11:49:32 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-05-27 12:20:11 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2012-05-27 12:20:11 -0500

tfoote gravatar image tfoote flag of United States
17349 47 150 244
http://www.ros.org/

From @kwc

FYI: you still need to run the ROS command-line tools with Python 2. The MORSE/Blender fixes only apply the the underlying communication libraries. Thus, run MORSE with Py3k, run ROS with Python 2.

edit flag offensive delete publish link more
1

answered 2012-02-20 09:36:20 -0500

William gravatar image William
2218 13 29 57
http://williamjwoodall.co...

What version of ROS are you trying to use? As far as I know many of the Python3 compatibility fixes were integrated into ROS Electric. You might try to update to that version.

If you are using Electric, how did you install Python3 and can you provide us with the PYTHON_PATH?

edit flag offensive delete publish link more

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2011-12-03 22:51:47 -0500

Seen: 259 times

Last updated: May 27 '12