weixin_39725118
weixin_39725118
2021-01-12 19:11

ImportError: cannot import name sensor

Hi, My System specifications: OS: Ubuntu 18.04, Memory: 15.7 GiB, Processor: AMD® Ryzen 7 3800x 8-core processor × 16, GPU 4 GiB. I have downloaded the CARLA Simulator. While executing the python script I got an ImportError: cannot import name sensor


pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "module_7.py", line 33, in <module>
    from carla            import sensor
ImportError: cannot import name 'sensor'
</module>

I have tried with python 3.6 and python 2.7. I got the same error in the both version (Please check the screenshot) python3 6 python2 7

Please help me to solve this

Thanks in Advance Malathi K

该提问来源于开源项目:carla-simulator/carla

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • qq_39038901 qq_39038901 1月前

    Do you slove the problem? I have the same problem with you. If you have sloved, please help me.

    点赞 评论 复制链接分享
  • weixin_39637457 weixin_39637457 3月前

    Hi, My System specifications: OS: Ubuntu 18.04, Memory: 15.7 GiB, Processor: AMD® Ryzen 7 3800x 8-core processor × 16, GPU 4 GiB. I have downloaded the CARLA Simulator. While executing the python script I got an ImportError: cannot import name sensor

    
    pygame 1.9.6
    Hello from the pygame community. https://www.pygame.org/contribute.html
    Traceback (most recent call last):
      File "module_7.py", line 33, in <module>
        from carla            import sensor
    ImportError: cannot import name 'sensor'
    </module>

    I have tried with python 3.6 and python 2.7. I got the same error in the both version (Please check the screenshot) python3 6 python2 7

    Please help me to solve this

    Thanks in Advance Malathi K

    your problem is fixed just execute your code as super user sudo python3 module_7.py will fix the issue.

    点赞 评论 复制链接分享
  • weixin_39637457 weixin_39637457 3月前

    The reason for your guys not able to import the module is due to access restriction. simple solution to overcome this is run your code as super user ,type sudo python3 and execute your required code. It should work fine.

    点赞 评论 复制链接分享
  • weixin_39766014 weixin_39766014 3月前

    Hi, My System specifications: OS: Ubuntu 18.04, Memory: 15.7 GiB, Processor: AMD® Ryzen 7 3800x 8-core processor × 16, GPU 4 GiB. I have downloaded the CARLA Simulator. While executing the python script I got an ImportError: cannot import name sensor

    
    pygame 1.9.6
    Hello from the pygame community. https://www.pygame.org/contribute.html
    Traceback (most recent call last):
      File "module_7.py", line 33, in <module>
        from carla            import sensor
    ImportError: cannot import name 'sensor'
    </module>

    I have tried with python 3.6 and python 2.7. I got the same error in the both version (Please check the screenshot) python3 6 python2 7

    Please help me to solve this

    Thanks in Advance Malathi K

    Hey I have the same issue please help

    点赞 评论 复制链接分享
  • weixin_39913141 weixin_39913141 3月前

    that has nothing to do with CARLA. That is not our code, so please check out with the people who made that code.

    点赞 评论 复制链接分享

为你推荐