1

Ive been trying to work with CARLA. When I tried opening their example generate_traffic.py in a cmd to create some traffic i get an error: No module named 'carla.libcarla'. I already looked through all other posts and downgraded to python 3.7 but seems to work. here the failcode:

Traceback (most recent call last):
 File "C:\carla\WindowsNoEditor\PythonAPI\examples\generate_traffic.py", line 24, in <module>
 import carla
 File "C:\Users\x\AppData\Local\Programs\Python\Python37-32\lib\site-packages\carla\__init__.py", line 8, in <module>
 from .libcarla import *
ModuleNotFoundError: No module named 'carla.libcarla'

I just can't find any solution to this

Daraan
5,1877 gold badges25 silver badges51 bronze badges
asked Aug 31, 2024 at 12:57
5
  • 1
    try import carla.libcarla Commented Aug 31, 2024 at 13:47
  • sadly doesnt change anything Commented Aug 31, 2024 at 14:10
  • works on my system. Is there a path location issue? Commented Aug 31, 2024 at 14:34
  • Which version of Carla are you using? This also happens if you just execute import carla in a shell as well, right? Commented Jan 14, 2025 at 10:04
  • Are you possibly having a folder named carla in your working dir, PATH or PYTHONPATH variables. These are common problems that could lead to a wrong import location. Commented May 26, 2025 at 13:36

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.