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

Only with ros2 run: ModuleNotFoundError: No module named 'nuscenes.nuscenes' #1137

Open
juliaivonne opened this issue Feb 2, 2025 · 1 comment

Comments

@juliaivonne
Copy link

I am using ROS2 Foxy on Ubunu 20.04 with Python 3.8. I need to use nuscenes inside a ROS2-Node but I always get a ModuleNotFoundError.
I tried the following things:

  1. installing via pip install inside a venv (Creating via python venv module). Inside the python shell and PyCharm, everything works fine. (import nuscenes works). But when I am trying to run my "testing node" (see below), I get the error. (Yes, my venv was activated the whole time and I put "[build_scripts]
    executable=/usr/bin/env python3" to my setup.cfg of the node. Also, another module only installed inside my venv worked without errors. So I think, the venv is not the problem)

  2. installing via the advanced installation inside my venv (following https://github.com/nutonomy/nuscenes-devkit/blob/master/docs/installation.md#install-required-packages). Same Problem as 1

  3. I read, that nuscenes was only tested with python 3.7 and python 3.6, so I creating a conda env with python 3.7 for nuscenes. I tried installing via the advanced installation, but I got an error about the requirement for numpy. Since Python 3.7 only works for numpy until 1.21 and the requirements-file requires numpy>=1.22.0, I had to change the requirements to numpy>=1.19.5. Then I was able to install nuscenes, but I got errors about ros2 (pkg_resources.DistributionNotFound: The 'ros2cli==0.9.13' distribution was not found and is required by the application).

I don't know what else to do. I also checked the pythonpathes. Is there any way to use nuscenes for ROS2 Foxy and Python 3.8?

I used the following "testing node":
from nuscenes.nuscenes import NuScenes
import pydash

def main():
print('Hi from nuscenes.')
print(pydash.file)
if name == 'main':
main()

both modules, nuscenes and pydash are only installed inside the two venvs.

@whyekit-motional
Copy link
Collaborator

@juliaivonne perhaps you can reach out to the ROS community regarding this

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

No branches or pull requests

2 participants