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

WEST ERROR: extension command build was improperly defined #15906

Closed
maxxlife opened this issue May 4, 2019 · 2 comments
Closed

WEST ERROR: extension command build was improperly defined #15906

maxxlife opened this issue May 4, 2019 · 2 comments
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@maxxlife
Copy link
Contributor

maxxlife commented May 4, 2019

I'm trying to run west, but it seems that it is quite difficult to do.
I'm trying to repeat everythin what is written here https://docs.zephyrproject.org/latest/getting_started/index.html

That error I receive when I'm running that command west build -b reel_board samples/hello_world

#############################################################
ZEPHYR_BASE=/home/maxxlife/zephyrproject/zephyr (origin: env)

ERROR: extension command build was improperly defined and could not be run: could not import /home/maxxlife/zephyrproject/zephyr/scripts/west_commands/build.py

Traceback (most recent call last):
File "/home/maxxlife/zephyrproject/.west/west/src/west/commands/command.py", line 317, in __call__
mod = _commands_module_from_file(self.py_file)
File "/home/maxxlife/zephyrproject/.west/west/src/west/commands/command.py", line 284, in _commands_module_from_file
mod = _import_mod_from(mod_name, file)
File "/home/maxxlife/zephyrproject/.west/west/src/west/commands/command.py", line 281, in _import_mod_from
spec.loader.exec_module(mod)
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/maxxlife/zephyrproject/zephyr/scripts/west_commands/build.py", line 12, in <module> from cmake import DEFAULT_CMAKE_GENERATOR, run_cmake, run_build, CMakeCache ImportError: cannot import name 'DEFAULT_CMAKE_GENERATOR'`

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/maxxlife/zephyrproject/.west/west/src/west/main.py", line 580, in main args.handler(args, unknown)
File "/home/maxxlife/zephyrproject/.west/west/src/west/main.py", line 323, in ext_command_handler command = spec.factory()
File "/home/maxxlife/zephyrproject/.west/west/src/west/commands/command.py", line 320, in __call__
hint='could not import {}'.format(self.py_file)) from ie
west.commands.command.ExtensionCommandError
Do you know any suggestions how to solve it?

@maxxlife maxxlife added the bug The issue is a bug, or the PR is fixing a bug label May 4, 2019
@maxxlife maxxlife closed this as completed May 4, 2019
@maxxlife
Copy link
Contributor Author

maxxlife commented May 4, 2019

Just I need to be more careful^_^

@aeremin
Copy link
Contributor

aeremin commented Feb 24, 2020

For the next poor soul who will google this error and will find this issue:
You probably missed this step:

Install needed Python packages

pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants