今天运行carla报错了,有人遇到过吗?
python automatic_control.py
pygame 2.1.2 (SDL 2.0.16, Python 3.6.9)
Hello from the pygame community. https://www.pygame.org/contribute.html
INFO: listening to server 127.0.0.1:2000
Example of automatic vehicle control from client side.
Traceback (most recent call last):
File "automatic_control.py", line 846, in <module>
main()
File "automatic_control.py", line 839, in main
game_loop(args)
File "automatic_control.py", line 696, in game_loop
traffic_manager = client.get_trafficmanager()
AttributeError: 'Client' object has no attribute 'get_trafficmanager'
解决方法记录:
卸载carla
pip uninstall carla
重新安装和carla安装包匹配的carla库。
pip3 install carla==0.9.13 -i https://pypi.douban.com/simple --trusted-host pypi.douban.com virtualenvwrapper
carla不好安装,需要指定下源和信任关系。
安装好后再查看carla的版本。
pip list
vtd@vtd:~$ pip list
Package Version
----------------------- -------------------
addict 2.4.0
anyio 3.6.1
apturl 0.5.2
argcomplete 1.8.1
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asn1crypto 0.24.0
async-generator 1.10
attrs 21.4.0
Babel 2.10.3
backcall 0.2.0
beautifulsoup4 4.6.0
bleach 4.1.0
Brlapi 0.6.6
carla 0.9.13
certifi 2018.1.18
cffi 1.15.0
chardet 3.0.4
click 6.7
最后再运行carla就ok了。
python automatic_control.py