Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using with python3 #95

Open
Rezenders opened this issue Apr 28, 2021 · 0 comments
Open

Error using with python3 #95

Rezenders opened this issue Apr 28, 2021 · 0 comments

Comments

@Rezenders
Copy link

Rezenders commented Apr 28, 2021

Is this package compatible with python3? I saw that there are a few commits related to this topic.

I am trying to build ROS from source using python3, everything builds just fine.
But when I run capability_server I get the following error:

Traceback (most recent call last):
  File "/ros_catkin_ws/install_isolated/lib/capabilities/capability_server", line 8, in <module>
    from rospy.impl import tcpros_service
  File "/ros_catkin_ws/install_isolated/lib/python3/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/ros_catkin_ws/install_isolated/lib/python3/dist-packages/rospy/client.py", line 52, in <module>
    import roslib
  File "/ros_catkin_ws/install_isolated/lib/python3/dist-packages/roslib/__init__.py", line 50, in <module>
    from roslib.launcher import load_manifest  # noqa: F401
  File "/ros_catkin_ws/install_isolated/lib/python3/dist-packages/roslib/launcher.py", line 42, in <module>
    import rospkg
ImportError: No module named rospkg
================================================================================REQUIRED process [capability_server-7] has died!
process has died [pid 27571, exit code 1, cmd /ros_catkin_ws/install_isolated/lib/capabilities/capability_server __name:=capability_server __log:=/root/.ros/log/211af6f2-a85e-11eb-a4ff-0242ac110002/capability_server-7.log].
log file: /root/.ros/log/211af6f2-a85e-11eb-a4ff-0242ac110002/capability_server-7*.log
Initiating shutdown!
================================================================================

It seems that this package is still trying to import rospkg from python2. I don't know if I build it wrongly or if it is related to the package itself. Sorry if this is my mistake.

I am building the workspace like this:
$ export ROS_PYTHON_VERSION=3 && python3 ./src/catkin/bin/catkin_make_isolated --install -CMAKE_BUILD_TYPE=Release -j1 --catkin-make-args all

BTW, I am using ubuntu 18.04 and ROS melodic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant