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

CARLA 0.9.14 - PythonAPI - ModuleNotFoundError: No module named 'carla.libcarla.command' #6414

Open
gabrik opened this issue Apr 19, 2023 · 6 comments · Fixed by #8161
Open

Comments

@gabrik
Copy link

gabrik commented Apr 19, 2023

Hi,

While writing our own setup script to spawn cars and pedestrians in the simulator, we encountered this issue when trying to import the SpawnActor, or any module under carla.command

Our setup script is based on the /carla/PythonAPI/examples/generate_traffic.py one.

Any suggestion?

CARLA version: 0.9.14
Platform/OS: Ubuntu 20.04
Problem you have experienced: ModuleNotFoundError: No module named 'carla.libcarla.command'
What you expected to happen: to import the module
Steps to reproduce:

Install carla python from pypi: and try to import a command

pip3 install carla==0.9.14
python3
> from carla.command import SpawnActor
File "/root/utils/prepare-world.py", line 8, in <module>
    from carla.command import SpawnActor, SetAutopilot, FutureActor
File "/usr/local/lib/python3.8/dist-packages/carla/command.py", line 8, in <module>
    from .libcarla.command import *
ModuleNotFoundError: No module named 'carla.libcarla.command'
@vagaiprem
Copy link

i am also facing same error plz help anyone in windows environment

@NurmaU
Copy link

NurmaU commented Sep 6, 2023

Solution is here https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/generate_traffic.py

import carla
SpawnActor = carla.command.SpawnActor

@gabrik
Copy link
Author

gabrik commented Sep 7, 2023

Solution is here https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/generate_traffic.py

import carla
SpawnActor = carla.command.SpawnActor

That does not work if CARLA python API (0.9.14) is installed from pip.

@Youngzipper
Copy link

i am also facing same error plz help anyone in windows environment

have you found the solution? i encountered the same problem in windows.

Copy link

stale bot commented Dec 21, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Dec 21, 2023
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this issue Sep 18, 2024
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this issue Sep 18, 2024
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this issue Sep 18, 2024
@Daraan
Copy link

Daraan commented Sep 18, 2024

I've now proposed a working fix for this see: #8161

@stale stale bot removed the stale Issue has not had recent activity label Sep 18, 2024
Daraan added a commit to Daraan/CARLA-Simulator-Fork-DebianFix that referenced this issue Jan 16, 2025
PabloVD pushed a commit that referenced this issue Jan 17, 2025
…port ...` (#8161)

* Correct "carla[.libcarla].command" in sys.modules

Fixes  #6414  #6414

* Updated changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants