Carla: [0.9.5] automatic_control.py can not run

Created on 16 Apr 2019  路  4Comments  路  Source: carla-simulator/carla

hello, everyone.
In Carla0.9.5,After I run the script automatic_control.py. It shows the error as below, anyone can help me? thanks!

pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "automatic_control.py", line 88, in
from agents.navigation.roaming_agent import RoamingAgent
ImportError: No module named agents.navigation.roaming_agent

stale

Most helpful comment

You need to add carla to your PYTHONPATH.
Example:

export PYTHONPATH=$PYTHONPATH:carla-0.9.5/PythonAPI/carla/

All 4 comments

You need to add carla to your PYTHONPATH.
Example:

export PYTHONPATH=$PYTHONPATH:carla-0.9.5/PythonAPI/carla/

You need to add carla to your PYTHONPATH.
Example:

export PYTHONPATH=$PYTHONPATH:carla-0.9.5/PythonAPI/carla/

thans very much! your way helps me a lot.

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.

For windows this will help.
install package using pip utility as the following

go to directory PythonAPI/carla/agents
and create setup.py file and write the following code in that file

from distutils.core import setup

setup(name='agents',
        version='0.9.5', #doesn't matter I guess
        py_modules=['agents'],
        )

Now go to anaconda terminal and do cd to directory PythonAPI/carla
and apply following command to install agents

pip install -e agents

This will install agents and resolve the agents.navigation not found issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rowanmcallister picture rowanmcallister  路  3Comments

phzeller picture phzeller  路  3Comments

cstamatiadis picture cstamatiadis  路  3Comments

qixiaoshuai0120 picture qixiaoshuai0120  路  3Comments

syinari0123 picture syinari0123  路  4Comments