Topics

question in zephyrproject


최재민 <jaeminy.choi@...>
 

Hello.

 

This is Jaemin from Samsung Electronics and we are trying to set the environment up for Zephyr with  https://docs.zephyrproject.org/latest/getting_started/index.html.

 

Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )

 

The error which can't find pykwalify comes up like below.


I've googled it to solve the problem but i ended up here.

Can I have some advices? 

(All programs I should install are beyond minimum version and I skipped set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin 

 

 


Serafin
 

Hello


Did you do the install python dependencies step?  https://docs.zephyrproject.org/latest/getting_started/index.html#install-python-dependencies


Best regards

Serafin


On 17/09/2019 10:57, via Lists.Zephyrproject.Org wrote:

Hello.

 

This is Jaemin from Samsung Electronics and we are trying to set the environment up for Zephyr with  https://docs.zephyrproject.org/latest/getting_started/index.html.

 

Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )

 

The error which can't find pykwalify comes up like below.


I've googled it to solve the problem but i ended up here.

Can I have some advices? 

(All programs I should install are beyond minimum version and I skipped set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin 

 

 


Allen Curtis
 

I had this same problem. My solution was to export PYTHONPATH to include the directory containing this module. If you went through the instructions, installing all the dependencies, it is installed on your system somewhere.


On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org <jaeminy.choi=samsung.com@...> wrote:

Hello.

 

This is Jaemin from Samsung Electronics and we are trying to set the environment up for Zephyr with  https://docs.zephyrproject.org/latest/getting_started/index.html.

 

Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )

 

The error which can't find pykwalify comes up like below.


I've googled it to solve the problem but i ended up here.

Can I have some advices? 

(All programs I should install are beyond minimum version and I skipped set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin 

 

 



--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


Bolivar, Marti
 

Hi Jaemin, Allen,

"Allen Curtis via Lists.Zephyrproject.Org"
<allen=criticalsoftwaresolutions.com@...> writes:

I had this same problem. My solution was to export PYTHONPATH to include
the directory containing this module. If you went through the instructions,
installing all the dependencies, it is installed on your system
somewhere.
Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.


On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org <jaeminy.choi=
samsung.com@...> wrote:

Hello.



This is Jaemin from Samsung Electronics and we are trying to set the
environment up for Zephyr with
https://docs.zephyrproject.org/latest/getting_started/index.html.



Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )



The error which can't find pykwalify comes up like below.
Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:

-- Found west: /home/jaeminy.choi/.local/bin/west

If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:

$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools

So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.

First, you should check that pykwalify is installed, like this:

$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages

If that doesn't work, reinstall west with pip3 to make sure you get it.

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed

For more details, check:

https://docs.python.org/3/library/site.html#site.USER_BASE



I've googled it to solve the problem but i ended up here.
By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in

https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste

It makes it easier for others to google your exact error message.


Can I have some advices?
Hope this helps.

Thanks,
Marti


(All programs I should install are beyond minimum version and I skipped
set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin






--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*


Allen Curtis
 

Not my experience. The last time I installed the dependencies went into a dotlocal directory under the user account. Python couldn’t find them. 

On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...> wrote:
Hi Jaemin, Allen,

"Allen Curtis via Lists.Zephyrproject.Org"
<allen=criticalsoftwaresolutions.com@...> writes:

> I had this same problem. My solution was to export PYTHONPATH to include
> the directory containing this module. If you went through the instructions,
> installing all the dependencies, it is installed on your system
> somewhere.

Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.

>
> On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org <jaeminy.choi=
> samsung.com@...> wrote:
>
>> Hello.
>>
>>
>>
>> This is Jaemin from Samsung Electronics and we are trying to set the
>> environment up for Zephyr with
>> https://docs.zephyrproject.org/latest/getting_started/index.html.
>>
>>
>>
>> Everything went well with your manuals but when I try this one
>>
>> west build -b reel_board samples/hello_world
>>
>> (in my case west build -b qemu_x86 samples/hello_world )
>>
>>
>>
>> The error which can't find pykwalify comes up like below.

Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:

-- Found west: /home/jaeminy.choi/.local/bin/west

If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:

$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools

So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.

First, you should check that pykwalify is installed, like this:

$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages

If that doesn't work, reinstall west with pip3 to make sure you get it.

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site           
sys.path = [
    '/usr/local/lib/python3.6',
    '/usr/lib/python36.zip',
    '/usr/lib/python3.6',
    '/usr/lib/python3.6/lib-dynload',
    '/home/foo/.local/lib/python3.6/site-packages',
    '/usr/local/lib/python3.6/dist-packages',
    '/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed

For more details, check:

https://docs.python.org/3/library/site.html#site.USER_BASE

>>
>>
>> I've googled it to solve the problem but i ended up here.

By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in

https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste

It makes it easier for others to google your exact error message.

>>
>> Can I have some advices?

Hope this helps.

Thanks,
Marti

>>
>> (All programs I should install are beyond minimum version and I skipped
>> set up a toolchain step because I set up the Zephyr SDK toolchains)
>>
>>
>>
>> Thanks,
>>
>> Jaemin
>>
>>
>>
>>
>>
>>
>>
>
> --
> *Allen Curtis*
> Medical Device Architect
> *Critical Software Solutions, LLC*
>
>
--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


Carles Cufi
 

Right, but that doesn’t require you to set PYTHONPATH, but to add that dotlocal folder to your PATH.

See here:

https://docs.zephyrproject.org/latest/getting_started/index.html#python-and-pip

 

From: devel@... <devel@...> On Behalf Of Allen Curtis via Lists.Zephyrproject.Org
Sent: 17 September 2019 21:17
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] question in zephyrproject

 

Not my experience. The last time I installed the dependencies went into a dotlocal directory under the user account. Python couldn’t find them. 

 

On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...> wrote:

Hi Jaemin, Allen,

"Allen Curtis via Lists.Zephyrproject.Org"
<allen=criticalsoftwaresolutions.com@...> writes:

> I had this same problem. My solution was to export PYTHONPATH to include
> the directory containing this module. If you went through the instructions,
> installing all the dependencies, it is installed on your system
> somewhere.

Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.

>
> On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org <jaeminy.choi=
> samsung.com@...> wrote:
>
>> Hello.
>>
>>
>>
>> This is Jaemin from Samsung Electronics and we are trying to set the
>> environment up for Zephyr with
>> https://docs.zephyrproject.org/latest/getting_started/index.html.
>>
>>
>>
>> Everything went well with your manuals but when I try this one
>>
>> west build -b reel_board samples/hello_world
>>
>> (in my case west build -b qemu_x86 samples/hello_world )
>>
>>
>>
>> The error which can't find pykwalify comes up like below.

Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:

-- Found west: /home/jaeminy.choi/.local/bin/west

If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:

$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools

So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.

First, you should check that pykwalify is installed, like this:

$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages

If that doesn't work, reinstall west with pip3 to make sure you get it.

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site           
sys.path = [
    '/usr/local/lib/python3.6',
    '/usr/lib/python36.zip',
    '/usr/lib/python3.6',
    '/usr/lib/python3.6/lib-dynload',
    '/home/foo/.local/lib/python3.6/site-packages',
    '/usr/local/lib/python3.6/dist-packages',
    '/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed

For more details, check:

https://docs.python.org/3/library/site.html#site.USER_BASE

>>
>>
>> I've googled it to solve the problem but i ended up here.

By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in

https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste

It makes it easier for others to google your exact error message.

>>
>> Can I have some advices?

Hope this helps.

Thanks,
Marti

>>
>> (All programs I should install are beyond minimum version and I skipped
>> set up a toolchain step because I set up the Zephyr SDK toolchains)
>>
>>
>>
>> Thanks,
>>
>> Jaemin
>>
>>
>>
>>
>>
>>
>>
>
> --
> *Allen Curtis*
> Medical Device Architect
> *Critical Software Solutions, LLC*
>
>

--

Allen Curtis

Medical Device Architect

Critical Software Solutions, LLC

 


Bolivar, Marti
 

Allen Curtis <allen@...> writes:

Not my experience. The last time I installed the dependencies went into a
dotlocal directory under the user account. Python couldn’t find them.
What distro are you using? Did you try running python3 -m site as
described below to debug?


On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...>
wrote:

Hi Jaemin, Allen,

"Allen Curtis via Lists.Zephyrproject.Org"
<allen=criticalsoftwaresolutions.com@...> writes:

I had this same problem. My solution was to export PYTHONPATH to include
the directory containing this module. If you went through the
instructions,
installing all the dependencies, it is installed on your system
somewhere.
Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.


On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org
<jaeminy.choi=
samsung.com@...> wrote:

Hello.



This is Jaemin from Samsung Electronics and we are trying to set the
environment up for Zephyr with
https://docs.zephyrproject.org/latest/getting_started/index.html.



Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )



The error which can't find pykwalify comes up like below.
Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:

-- Found west: /home/jaeminy.choi/.local/bin/west

If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:

$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools

So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.

First, you should check that pykwalify is installed, like this:

$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages

If that doesn't work, reinstall west with pip3 to make sure you get it.

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed

For more details, check:

https://docs.python.org/3/library/site.html#site.USER_BASE



I've googled it to solve the problem but i ended up here.
By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in


https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste

It makes it easier for others to google your exact error message.


Can I have some advices?
Hope this helps.

Thanks,
Marti


(All programs I should install are beyond minimum version and I skipped
set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin






--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*

--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*


Bolivar, Marti
 

"Cufi, Carles" <Carles.Cufi@...> writes:

Right, but that doesn’t require you to set PYTHONPATH, but to add that dotlocal folder to your PATH.
See here:
https://docs.zephyrproject.org/latest/getting_started/index.html#python-and-pip
I don't think that's the issue here. Jaemin can run west, but west can't
import pykwalify. That's not a PATH (environment variable) issue, but a
sys.path (Python module search path) issue, I think, no?


From: devel@... <devel@...> On Behalf Of Allen Curtis via Lists.Zephyrproject.Org
Sent: 17 September 2019 21:17
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] question in zephyrproject

Not my experience. The last time I installed the dependencies went into a dotlocal directory under the user account. Python couldn’t find them.

On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>> wrote:
Hi Jaemin, Allen,

"Allen Curtis via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>"
<allen=criticalsoftwaresolutions.com@...<mailto:criticalsoftwaresolutions.com@...>> writes:

I had this same problem. My solution was to export PYTHONPATH to include
the directory containing this module. If you went through the instructions,
installing all the dependencies, it is installed on your system
somewhere.
Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.


On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org> <jaeminy.choi=
samsung.com@...<mailto:samsung.com@...>> wrote:

Hello.



This is Jaemin from Samsung Electronics and we are trying to set the
environment up for Zephyr with
https://docs.zephyrproject.org/latest/getting_started/index.html.



Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )



The error which can't find pykwalify comes up like below.
Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:

-- Found west: /home/jaeminy.choi/.local/bin/west

If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:

$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools

So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.

First, you should check that pykwalify is installed, like this:

$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages

If that doesn't work, reinstall west with pip3 to make sure you get it.

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed

For more details, check:

https://docs.python.org/3/library/site.html#site.USER_BASE



I've googled it to solve the problem but i ended up here.
By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in

https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste

It makes it easier for others to google your exact error message.


Can I have some advices?
Hope this helps.

Thanks,
Marti


(All programs I should install are beyond minimum version and I skipped
set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin






--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*

--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


Allen Curtis
 

I did not see the “python -m site” in the instructions. 

On Tue, Sep 17, 2019 at 12:33 PM Bolivar, Marti <Marti.Bolivar@...> wrote:
Allen Curtis <allen@...> writes:

> Not my experience. The last time I installed the dependencies went into a
> dotlocal directory under the user account. Python couldn’t find them.

What distro are you using? Did you try running python3 -m site as
described below to debug?

>
> On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...>
> wrote:
>
>> Hi Jaemin, Allen,
>>
>> "Allen Curtis via Lists.Zephyrproject.Org"
>> <allen=criticalsoftwaresolutions.com@...> writes:
>>
>> > I had this same problem. My solution was to export PYTHONPATH to include
>> > the directory containing this module. If you went through the
>> instructions,
>> > installing all the dependencies, it is installed on your system
>> > somewhere.
>>
>> Hmm, that shouldn't be needed if the Python dependencies were installed
>> correctly.
>>
>> >
>> > On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org
>> <jaeminy.choi=
>> > samsung.com@...> wrote:
>> >
>> >> Hello.
>> >>
>> >>
>> >>
>> >> This is Jaemin from Samsung Electronics and we are trying to set the
>> >> environment up for Zephyr with
>> >> https://docs.zephyrproject.org/latest/getting_started/index.html.
>> >>
>> >>
>> >>
>> >> Everything went well with your manuals but when I try this one
>> >>
>> >> west build -b reel_board samples/hello_world
>> >>
>> >> (in my case west build -b qemu_x86 samples/hello_world )
>> >>
>> >>
>> >>
>> >> The error which can't find pykwalify comes up like below.
>>
>> Based on your screenshot, it looks like you are running on Linux, so you
>> should have installed west using "pip3 install --user west", which it
>> looks like you did:
>>
>> -- Found west: /home/jaeminy.choi/.local/bin/west
>>
>> If so, then pykwalify should have been installed too, because west
>> declares it as a dependency to pip:
>>
>> $ pip3 show west | grep Requires:
>> Requires: colorama, PyYAML, pykwalify, configobj, setuptools
>>
>> So as Allen said, if you have west but it can't import pykwalify, there
>> is a problem with the Python path. But you shouldn't need to set
>> PYTHONPATH; pip and Python's USER_BASE should take care of this for you.
>>
>> First, you should check that pykwalify is installed, like this:
>>
>> $ pip3 show -f pykwalify | grep Location:
>> Location: /home/foo/.local/lib/python3.6/site-packages
>>
>> If that doesn't work, reinstall west with pip3 to make sure you get it.
>>
>> Second, run "python3 -m site". The output should contain the pykwalify
>> installation directory in sys.path. Something like this:
>>
>> $ python3 -m site
>> sys.path = [
>>     '/usr/local/lib/python3.6',
>>     '/usr/lib/python36.zip',
>>     '/usr/lib/python3.6',
>>     '/usr/lib/python3.6/lib-dynload',
>>     '/home/foo/.local/lib/python3.6/site-packages',
>>     '/usr/local/lib/python3.6/dist-packages',
>>     '/usr/lib/python3/dist-packages',
>> ]
>> USER_BASE: '/home/foo/.local' (exists)
>> USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
>> ENABLE_USER_SITE: True
>>
>> Make sure:
>>
>> 1. USER_SITE is the directory where pykwalify was installed
>> 2. ENABLE_USER_SITE is True
>> 3. sys.path contains the directory where pykwalify was installed
>>
>> For more details, check:
>>
>> https://docs.python.org/3/library/site.html#site.USER_BASE
>>
>> >>
>> >>
>> >> I've googled it to solve the problem but i ended up here.
>>
>> By the way, for the future, please consider cutting and pasting text
>> instead of using screenshots of your terminal window as discussed in
>>
>>
>> https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste
>>
>> It makes it easier for others to google your exact error message.
>>
>> >>
>> >> Can I have some advices?
>>
>> Hope this helps.
>>
>> Thanks,
>> Marti
>>
>> >>
>> >> (All programs I should install are beyond minimum version and I skipped
>> >> set up a toolchain step because I set up the Zephyr SDK toolchains)
>> >>
>> >>
>> >>
>> >> Thanks,
>> >>
>> >> Jaemin
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> > --
>> > *Allen Curtis*
>> > Medical Device Architect
>> > *Critical Software Solutions, LLC*
>> >
>> >
>
> --
> *Allen Curtis*
> Medical Device Architect
> *Critical Software Solutions, LLC*
--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


Carles Cufi
 

-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@...>
Sent: 17 September 2019 21:35
To: Cufi, Carles <Carles.Cufi@...>;
allen@...
Cc: devel@...
Subject: RE: [Zephyr-devel] question in zephyrproject

"Cufi, Carles" <Carles.Cufi@...> writes:

Right, but that doesn’t require you to set PYTHONPATH, but to add that
dotlocal folder to your PATH.
See here:
https://docs.zephyrproject.org/latest/getting_started/index.html#pytho
n-and-pip
I don't think that's the issue here. Jaemin can run west, but west can't
import pykwalify. That's not a PATH (environment variable) issue, but a
sys.path (Python module search path) issue, I think, no?
He mentioned dependencies going to a dotlocal directory in his home, so I assumed he meant that the executable couldn't be found (since this is a very common case). Instead it was a Python module, so you are right. This is indeed about PYTHONPATH and not PATH in any case.




From: devel@... <devel@...> On
Behalf Of Allen Curtis via Lists.Zephyrproject.Org
Sent: 17 September 2019 21:17
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...
Subject: Re: [Zephyr-devel] question in zephyrproject

Not my experience. The last time I installed the dependencies went
into a dotlocal directory under the user account. Python couldn’t find
them.

On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti
<Marti.Bolivar@...<mailto:Marti.Bolivar@...>> wrote:
Hi Jaemin, Allen,

"Allen Curtis via
Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>"
<allen=criticalsoftwaresolutions.com@...<mailto:crit
icalsoftwaresolutions.com@...>> writes:

I had this same problem. My solution was to export PYTHONPATH to
include the directory containing this module. If you went through the
instructions, installing all the dependencies, it is installed on
your system somewhere.
Hmm, that shouldn't be needed if the Python dependencies were
installed correctly.


On Tue, Sep 17, 2019 at 4:16 AM via
Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>
<jaeminy.choi=
samsung.com@...<mailto:samsung.com@...
ct.org>> wrote:

Hello.



This is Jaemin from Samsung Electronics and we are trying to set the
environment up for Zephyr with
https://docs.zephyrproject.org/latest/getting_started/index.html.



Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )



The error which can't find pykwalify comes up like below.
Based on your screenshot, it looks like you are running on Linux, so
you should have installed west using "pip3 install --user west", which
it looks like you did:

-- Found west: /home/jaeminy.choi/.local/bin/west

If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:

$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools

So as Allen said, if you have west but it can't import pykwalify,
there is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for
you.

First, you should check that pykwalify is installed, like this:

$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages

If that doesn't work, reinstall west with pip3 to make sure you get
it.

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed 2.
ENABLE_USER_SITE is True 3. sys.path contains the directory where
pykwalify was installed

For more details, check:

https://docs.python.org/3/library/site.html#site.USER_BASE



I've googled it to solve the problem but i ended up here.
By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in

https://docs.zephyrproject.org/latest/guides/getting-help.html#use-cop
y-paste

It makes it easier for others to google your exact error message.


Can I have some advices?
Hope this helps.

Thanks,
Marti


(All programs I should install are beyond minimum version and I
skipped set up a toolchain step because I set up the Zephyr SDK
toolchains)



Thanks,

Jaemin






--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*

--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


Lawrence King
 

I’m with Charles. I had to add this to my .bashrc

 

export PATH=~/.local/bin:$PATH

 

Once I did this everything is good.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: devel@... <devel@...> On Behalf Of Allen Curtis
Sent: Tuesday, September 17, 2019 3:36 PM
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...; jaeminy.choi@...
Subject: Re: [Zephyr-devel] question in zephyrproject

 

I did not see the “python -m site” in the instructions. 

 

On Tue, Sep 17, 2019 at 12:33 PM Bolivar, Marti <Marti.Bolivar@...> wrote:

Allen Curtis <allen@...> writes:

> Not my experience. The last time I installed the dependencies went into a
> dotlocal directory under the user account. Python couldn’t find them.

What distro are you using? Did you try running python3 -m site as
described below to debug?

>
> On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...>
> wrote:
>
>> Hi Jaemin, Allen,
>>
>> "Allen Curtis via Lists.Zephyrproject.Org"
>> <allen=criticalsoftwaresolutions.com@...> writes:
>>
>> > I had this same problem. My solution was to export PYTHONPATH to include
>> > the directory containing this module. If you went through the
>> instructions,
>> > installing all the dependencies, it is installed on your system
>> > somewhere.
>>
>> Hmm, that shouldn't be needed if the Python dependencies were installed
>> correctly.
>>
>> >
>> > On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org
>> <jaeminy.choi=
>> > samsung.com@...> wrote:
>> >
>> >> Hello.
>> >>
>> >>
>> >>
>> >> This is Jaemin from Samsung Electronics and we are trying to set the
>> >> environment up for Zephyr with
>> >> https://docs.zephyrproject.org/latest/getting_started/index.html.
>> >>
>> >>
>> >>
>> >> Everything went well with your manuals but when I try this one
>> >>
>> >> west build -b reel_board samples/hello_world
>> >>
>> >> (in my case west build -b qemu_x86 samples/hello_world )
>> >>
>> >>
>> >>
>> >> The error which can't find pykwalify comes up like below.
>>
>> Based on your screenshot, it looks like you are running on Linux, so you
>> should have installed west using "pip3 install --user west", which it
>> looks like you did:
>>
>> -- Found west: /home/jaeminy.choi/.local/bin/west
>>
>> If so, then pykwalify should have been installed too, because west
>> declares it as a dependency to pip:
>>
>> $ pip3 show west | grep Requires:
>> Requires: colorama, PyYAML, pykwalify, configobj, setuptools
>>
>> So as Allen said, if you have west but it can't import pykwalify, there
>> is a problem with the Python path. But you shouldn't need to set
>> PYTHONPATH; pip and Python's USER_BASE should take care of this for you.
>>
>> First, you should check that pykwalify is installed, like this:
>>
>> $ pip3 show -f pykwalify | grep Location:
>> Location: /home/foo/.local/lib/python3.6/site-packages
>>
>> If that doesn't work, reinstall west with pip3 to make sure you get it.
>>
>> Second, run "python3 -m site". The output should contain the pykwalify
>> installation directory in sys.path. Something like this:
>>
>> $ python3 -m site
>> sys.path = [
>>     '/usr/local/lib/python3.6',
>>     '/usr/lib/python36.zip',
>>     '/usr/lib/python3.6',
>>     '/usr/lib/python3.6/lib-dynload',
>>     '/home/foo/.local/lib/python3.6/site-packages',
>>     '/usr/local/lib/python3.6/dist-packages',
>>     '/usr/lib/python3/dist-packages',
>> ]
>> USER_BASE: '/home/foo/.local' (exists)
>> USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
>> ENABLE_USER_SITE: True
>>
>> Make sure:
>>
>> 1. USER_SITE is the directory where pykwalify was installed
>> 2. ENABLE_USER_SITE is True
>> 3. sys.path contains the directory where pykwalify was installed
>>
>> For more details, check:
>>
>> https://docs.python.org/3/library/site.html#site.USER_BASE
>>
>> >>
>> >>
>> >> I've googled it to solve the problem but i ended up here.
>>
>> By the way, for the future, please consider cutting and pasting text
>> instead of using screenshots of your terminal window as discussed in
>>
>>
>> https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste
>>
>> It makes it easier for others to google your exact error message.
>>
>> >>
>> >> Can I have some advices?
>>
>> Hope this helps.
>>
>> Thanks,
>> Marti
>>
>> >>
>> >> (All programs I should install are beyond minimum version and I skipped
>> >> set up a toolchain step because I set up the Zephyr SDK toolchains)
>> >>
>> >>
>> >>
>> >> Thanks,
>> >>
>> >> Jaemin
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> > --
>> > *Allen Curtis*
>> > Medical Device Architect
>> > *Critical Software Solutions, LLC*
>> >
>> >
>
> --
> *Allen Curtis*
> Medical Device Architect
> *Critical Software Solutions, LLC*

--

Allen Curtis

Medical Device Architect

Critical Software Solutions, LLC

 


Kinder, David B <david.b.kinder@...>
 

Great!

 

We’re working on an updated getting started guide that streamlines this setup process so some important steps such as updating the PATH are not missed (so easily).

Check out https://github.com/zephyrproject-rtos/zephyr/pull/19123

and the build artifacts for the GSG here: https://builds.zephyrproject.org/zephyrproject-rtos/zephyr/19123/docs/getting_started/index.html

 

Comments appreciated.

 

-- david

 

From: devel@... <devel@...> On Behalf Of Lawrence King
Sent: Tuesday, September 17, 2019 12:40 PM
To: Allen Curtis <allen@...>; Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...; jaeminy.choi@...
Subject: Re: [Zephyr-devel] question in zephyrproject

 

I’m with Charles. I had to add this to my .bashrc

 

export PATH=~/.local/bin:$PATH

 

Once I did this everything is good.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: devel@... <devel@...> On Behalf Of Allen Curtis
Sent: Tuesday, September 17, 2019 3:36 PM
To: Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...; jaeminy.choi@...
Subject: Re: [Zephyr-devel] question in zephyrproject

 

I did not see the “python -m site” in the instructions. 

 

On Tue, Sep 17, 2019 at 12:33 PM Bolivar, Marti <Marti.Bolivar@...> wrote:

Allen Curtis <allen@...> writes:

> Not my experience. The last time I installed the dependencies went into a
> dotlocal directory under the user account. Python couldn’t find them.

What distro are you using? Did you try running python3 -m site as
described below to debug?

>
> On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...>
> wrote:
>
>> Hi Jaemin, Allen,
>>
>> "Allen Curtis via Lists.Zephyrproject.Org"
>> <allen=criticalsoftwaresolutions.com@...> writes:
>>
>> > I had this same problem. My solution was to export PYTHONPATH to include
>> > the directory containing this module. If you went through the
>> instructions,
>> > installing all the dependencies, it is installed on your system
>> > somewhere.
>>
>> Hmm, that shouldn't be needed if the Python dependencies were installed
>> correctly.
>>
>> >
>> > On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org
>> <jaeminy.choi=
>> > samsung.com@...> wrote:
>> >
>> >> Hello.
>> >>
>> >>
>> >>
>> >> This is Jaemin from Samsung Electronics and we are trying to set the
>> >> environment up for Zephyr with
>> >> https://docs.zephyrproject.org/latest/getting_started/index.html.
>> >>
>> >>
>> >>
>> >> Everything went well with your manuals but when I try this one
>> >>
>> >> west build -b reel_board samples/hello_world
>> >>
>> >> (in my case west build -b qemu_x86 samples/hello_world )
>> >>
>> >>
>> >>
>> >> The error which can't find pykwalify comes up like below.
>>
>> Based on your screenshot, it looks like you are running on Linux, so you
>> should have installed west using "pip3 install --user west", which it
>> looks like you did:
>>
>> -- Found west: /home/jaeminy.choi/.local/bin/west
>>
>> If so, then pykwalify should have been installed too, because west
>> declares it as a dependency to pip:
>>
>> $ pip3 show west | grep Requires:
>> Requires: colorama, PyYAML, pykwalify, configobj, setuptools
>>
>> So as Allen said, if you have west but it can't import pykwalify, there
>> is a problem with the Python path. But you shouldn't need to set
>> PYTHONPATH; pip and Python's USER_BASE should take care of this for you.
>>
>> First, you should check that pykwalify is installed, like this:
>>
>> $ pip3 show -f pykwalify | grep Location:
>> Location: /home/foo/.local/lib/python3.6/site-packages
>>
>> If that doesn't work, reinstall west with pip3 to make sure you get it.
>>
>> Second, run "python3 -m site". The output should contain the pykwalify
>> installation directory in sys.path. Something like this:
>>
>> $ python3 -m site
>> sys.path = [
>>     '/usr/local/lib/python3.6',
>>     '/usr/lib/python36.zip',
>>     '/usr/lib/python3.6',
>>     '/usr/lib/python3.6/lib-dynload',
>>     '/home/foo/.local/lib/python3.6/site-packages',
>>     '/usr/local/lib/python3.6/dist-packages',
>>     '/usr/lib/python3/dist-packages',
>> ]
>> USER_BASE: '/home/foo/.local' (exists)
>> USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
>> ENABLE_USER_SITE: True
>>
>> Make sure:
>>
>> 1. USER_SITE is the directory where pykwalify was installed
>> 2. ENABLE_USER_SITE is True
>> 3. sys.path contains the directory where pykwalify was installed
>>
>> For more details, check:
>>
>> https://docs.python.org/3/library/site.html#site.USER_BASE
>>
>> >>
>> >>
>> >> I've googled it to solve the problem but i ended up here.
>>
>> By the way, for the future, please consider cutting and pasting text
>> instead of using screenshots of your terminal window as discussed in
>>
>>
>> https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste
>>
>> It makes it easier for others to google your exact error message.
>>
>> >>
>> >> Can I have some advices?
>>
>> Hope this helps.
>>
>> Thanks,
>> Marti
>>
>> >>
>> >> (All programs I should install are beyond minimum version and I skipped
>> >> set up a toolchain step because I set up the Zephyr SDK toolchains)
>> >>
>> >>
>> >>
>> >> Thanks,
>> >>
>> >> Jaemin
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> > --
>> > *Allen Curtis*
>> > Medical Device Architect
>> > *Critical Software Solutions, LLC*
>> >
>> >
>
> --
> *Allen Curtis*
> Medical Device Architect
> *Critical Software Solutions, LLC*

--

Allen Curtis

Medical Device Architect

Critical Software Solutions, LLC

 


Bolivar, Marti
 

Allen Curtis <allen@...> writes:

I did not see the “python -m site” in the instructions.
I'm referring to my response below:

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed


Bolivar, Marti
 

"Kinder, David B" <david.b.kinder@...> writes:

Great!

We’re working on an updated getting started guide that streamlines this setup process so some important steps such as updating the PATH are not missed (so easily).
Check out https://github.com/zephyrproject-rtos/zephyr/pull/19123
and the build artifacts for the GSG here:
https://builds.zephyrproject.org/zephyrproject-rtos/zephyr/19123/docs/getting_started/index.html
FWIW, recent versions of pip3 install will warn you if ~/.local/bin
(or wherever it installs packages with --user) are not on PATH, so
hopefully this problem will become less common as time goes on.


Comments appreciated.

-- david

From: devel@... <devel@...> On Behalf Of Lawrence King
Sent: Tuesday, September 17, 2019 12:40 PM
To: Allen Curtis <allen@...>; Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...; jaeminy.choi@...
Subject: Re: [Zephyr-devel] question in zephyrproject

I’m with Charles. I had to add this to my .bashrc

export PATH=~/.local/bin:$PATH

Once I did this everything is good.
That is a separate issue as described in the back and forth between
Carles and I.

Let's not confuse the PATH environment variable, which is used to locate
the executable "west" file, with sys.path, which is the variable
Python uses to locate importable modules. The latter can be augmented
using the PYTHONPATH environment variable, but it should not be
necessary if python and pip3 are configured properly (and using the
default configuration for at least Ubuntu and Arch in my testing).

Thanks,
Marti


Lawrence King
Principal Developer
+1(416)627-7302

From: devel@...<mailto:devel@...> <devel@...<mailto:devel@...>> On Behalf Of Allen Curtis
Sent: Tuesday, September 17, 2019 3:36 PM
To: Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>>
Cc: devel@...<mailto:devel@...>; jaeminy.choi@...<mailto:jaeminy.choi@...>
Subject: Re: [Zephyr-devel] question in zephyrproject

I did not see the “python -m site” in the instructions.

On Tue, Sep 17, 2019 at 12:33 PM Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>> wrote:
Allen Curtis <allen@...<mailto:allen@...>> writes:

Not my experience. The last time I installed the dependencies went into a
dotlocal directory under the user account. Python couldn’t find them.
What distro are you using? Did you try running python3 -m site as
described below to debug?


On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>>
wrote:

Hi Jaemin, Allen,

"Allen Curtis via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>"
<allen=criticalsoftwaresolutions.com@...<mailto:criticalsoftwaresolutions.com@...>> writes:

I had this same problem. My solution was to export PYTHONPATH to include
the directory containing this module. If you went through the
instructions,
installing all the dependencies, it is installed on your system
somewhere.
Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.


On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>
<jaeminy.choi=
samsung.com@...<mailto:samsung.com@...>> wrote:

Hello.



This is Jaemin from Samsung Electronics and we are trying to set the
environment up for Zephyr with
https://docs.zephyrproject.org/latest/getting_started/index.html.



Everything went well with your manuals but when I try this one

west build -b reel_board samples/hello_world

(in my case west build -b qemu_x86 samples/hello_world )



The error which can't find pykwalify comes up like below.
Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:

-- Found west: /home/jaeminy.choi/.local/bin/west

If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:

$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools

So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.

First, you should check that pykwalify is installed, like this:

$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages

If that doesn't work, reinstall west with pip3 to make sure you get it.

Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:

$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True

Make sure:

1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed

For more details, check:

https://docs.python.org/3/library/site.html#site.USER_BASE



I've googled it to solve the problem but i ended up here.
By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in


https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste

It makes it easier for others to google your exact error message.


Can I have some advices?
Hope this helps.

Thanks,
Marti


(All programs I should install are beyond minimum version and I skipped
set up a toolchain step because I set up the Zephyr SDK toolchains)



Thanks,

Jaemin






--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*

--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*
--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC


Jaemin Choi <jaeminy.choi@...>
 

The import error is solved due to you guys. Thank you.

 

>>> 1. USER_SITE is the directory where pykwalify was installed

>>> 2. ENABLE_USER_SITE is True

>>> 3. sys.path contains the directory where pykwalify was installed

 

These checklists should be added on the website I think.

I figured it out that USER_SITE wasn't the directory where pkywalify was installed.

 

To make them same, i reinstall python3 with this command

pip install python3 --user --force-reinstall 

and also had to remove build directory to make it try to build new setting. 

 

however, I faced another error when Im trying this same command.

west build -b reel_board samples/hello_world --pristine     

 

these are new err message


Zephyr version: 2.0.99
-- Found PythonInterp: /usr/bin/python (found suitable version "3.7.1", minimum required is "3.4")
-- Selected BOARD reel_board
-- Found west: /home1/jaeminy.choi/.local/bin/west (found suitable version "0.6.2", minimum required is "0.6.0")
-- Loading /home1/jaeminy.choi/zephyr/zephyproject/zephyr/boards/arm/reel_board/reel_board.dts as base
-- Overlaying /home1/jaeminy.choi/zephyr/zephyproject/zephyr/dts/common/common.dts
Device tree configuration written to /home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/zephyr/include/generated/generated_dts_board.conf
Parsing Kconfig tree in /home1/jaeminy.choi/zephyr/zephyproject/zephyr/Kconfig
Loaded configuration '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/boards/arm/reel_board/reel_board_defconfig'
Merged configuration '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/zephyr/.config'
-- Cache files will be written to: /home1/jaeminy.choi/.cache/zephyr
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CMake Error at ../../cmake/extensions.cmake:1326 (message):
  Assertion failed: The toolchain is unable to build a dummy C file.  See
  CMakeError.log.
Call Stack (most recent call first):
  ../../CMakeLists.txt:44 (assert)


-- Configuring incomplete, errors occurred!
See also "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeOutput.log".
See also "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeError.log".
ERROR: command exited with status 1: /usr/local/bin/cmake -B/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build -S/home1/jaeminy.choi/zephyr/zephyproject/zephyr/samples/hello_world -GNinja -DBOARD=reel_board 

 

----------------------------------------------------------------------------------------------------------------------------------------------------

 

 

and these are the contents in /home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeError.log

 

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags:

The output was:
1
/usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/b
in/ld: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr
-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/newlib/new
lib/libc/stdlib/exit.c:64: undefined reference to `_exit'
collect2: error: ld returned 1 exit status


Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags:

The output was:
1
/usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/b
in/ld: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr
-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/newlib/new
lib/libc/stdlib/exit.c:64: undefined reference to `_exit'
collect2: error: ld returned 1 exit status

--------------------------------------------------------------------------------------------------------------------------

 

 

 these are the contents in home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeOutput.log".

 

The target system is: Generic - 2.0.99 - arm
The host system is: Linux - 3.13.0-100-generic - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags: -c

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"

The C compiler identification is GNU, found in "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles
/3.15.2/CompilerIdC/CMakeCCompilerId.o"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags: -c

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"

The CXX compiler identification is GNU, found in "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFil
es/3.15.2/CompilerIdCXX/CMakeCXXCompilerId.o"

Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Founda
tion)":
arm-zephyr-eabi-gcc (crosstool-NG 1.24.0-rc2-dirty) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

 

 

----------------------------------------------------------------------------------

 

 

This below is the text error message you asked. (import error message)

jaeminy.choi@lion:~/zephyr/zephyrproject/zephyr (master)$ west build -b qemu_x86 samples/hello_world
-- west build: build configuration:
       source directory: /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/samples/hello_world
       build directory: /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/build
       BOARD: qemu_x86 (origin: command line)
-- west build: generating a build system
Zephyr version: 2.0.0
CMake Warning at /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/app/boilerplate.cmake:160 (message):
  The build directory must be cleaned pristinely when changing boards
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


-- Selected BOARD reel_board
-- Found west: /home1/jaeminy.choi/.local/bin/west (found suitable version "0.6.2", minimum required is "0.6.0")
CMake Error at /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/zephyr_module.cmake:45 (message):
  Traceback (most recent call last):

    File "/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/scripts/zephyr_module.py", line 19, in <module>
      import pykwalify.core

  ImportError: No module named 'pykwalify'

Call Stack (most recent call first):
  /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/app/boilerplate.cmake:429 (include)
  CMakeLists.txt:5 (include)


-- Configuring incomplete, errors occurred!
ERROR: command exited with status 1: /usr/local/bin/cmake -B/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/build -S/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=qemu_x86 

 

 

 

--------- Original Message ---------

Sender : Bolivar, Marti <Marti.Bolivar@...>

Date : 2019-09-18 05:22 (GMT+9)

Title : RE: [Zephyr-devel] question in zephyrproject

 

"Kinder, David B" <david.b.kinder@...> writes:

 

> Great!

>

> We’re working on an updated getting started guide that streamlines this setup process so some important steps such as updating the PATH are not missed (so easily).

> Check out https://github.com/zephyrproject-rtos/zephyr/pull/19123

> and the build artifacts for the GSG here:

> https://builds.zephyrproject.org/zephyrproject-rtos/zephyr/19123/docs/getting_started/index.html

 

FWIW, recent versions of pip3 install will warn you if ~/.local/bin

(or wherever it installs packages with --user) are not on PATH, so

hopefully this problem will become less common as time goes on.

 

>

> Comments appreciated.

>

> -- david

>

> From: devel@... <devel@...> On Behalf Of Lawrence King

> Sent: Tuesday, September 17, 2019 12:40 PM

> To: Allen Curtis <allen@...>; Bolivar, Marti <Marti.Bolivar@...>

> Cc: devel@...; jaeminy.choi@...

> Subject: Re: [Zephyr-devel] question in zephyrproject

>

> I’m with Charles. I had to add this to my .bashrc

>

> export PATH=~/.local/bin:$PATH

>

> Once I did this everything is good.

 

That is a separate issue as described in the back and forth between

Carles and I.

 

Let's not confuse the PATH environment variable, which is used to locate

the executable "west" file, with sys.path, which is the variable

Python uses to locate importable modules. The latter can be augmented

using the PYTHONPATH environment variable, but it should not be

necessary if python and pip3 are configured properly (and using the

default configuration for at least Ubuntu and Arch in my testing).

 

Thanks,

Marti

 

>

> Lawrence King

> Principal Developer

> +1(416)627-7302

>

> From: devel@...<mailto:devel@...> <devel@...<mailto:devel@...>> On Behalf Of Allen Curtis

> Sent: Tuesday, September 17, 2019 3:36 PM

> To: Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>>

> Cc: devel@...<mailto:devel@...>; jaeminy.choi@...<mailto:jaeminy.choi@...>

> Subject: Re: [Zephyr-devel] question in zephyrproject

>

> I did not see the “python -m site” in the instructions.

>

> On Tue, Sep 17, 2019 at 12:33 PM Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>> wrote:

> Allen Curtis <allen@...<mailto:allen@...>> writes:

>

>> Not my experience. The last time I installed the dependencies went into a

>> dotlocal directory under the user account. Python couldn’t find them.

>

> What distro are you using? Did you try running python3 -m site as

> described below to debug?

>

>>

>> On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>>

>> wrote:

>>

>>> Hi Jaemin, Allen,

>>>

>>> "Allen Curtis via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>"

>>> <allen=criticalsoftwaresolutions.com@...<mailto:criticalsoftwaresolutions.com@...>> writes:

>>>

>>> > I had this same problem. My solution was to export PYTHONPATH to include

>>> > the directory containing this module. If you went through the

>>> instructions,

>>> > installing all the dependencies, it is installed on your system

>>> > somewhere.

>>>

>>> Hmm, that shouldn't be needed if the Python dependencies were installed

>>> correctly.

>>>

>>> >

>>> > On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>

>>> <jaeminy.choi=

>>> > samsung.com@...<mailto:samsung.com@...>> wrote:

>>> >

>>> >> Hello.

>>> >>

>>> >>

>>> >>

>>> >> This is Jaemin from Samsung Electronics and we are trying to set the

>>> >> environment up for Zephyr with

>>> >> https://docs.zephyrproject.org/latest/getting_started/index.html.

>>> >>

>>> >>

>>> >>

>>> >> Everything went well with your manuals but when I try this one

>>> >>

>>> >> west build -b reel_board samples/hello_world

>>> >>

>>> >> (in my case west build -b qemu_x86 samples/hello_world )

>>> >>

>>> >>

>>> >>

>>> >> The error which can't find pykwalify comes up like below.

>>>

>>> Based on your screenshot, it looks like you are running on Linux, so you

>>> should have installed west using "pip3 install --user west", which it

>>> looks like you did:

>>>

>>> -- Found west: /home/jaeminy.choi/.local/bin/west

>>>

>>> If so, then pykwalify should have been installed too, because west

>>> declares it as a dependency to pip:

>>>

>>> $ pip3 show west | grep Requires:

>>> Requires: colorama, PyYAML, pykwalify, configobj, setuptools

>>>

>>> So as Allen said, if you have west but it can't import pykwalify, there

>>> is a problem with the Python path. But you shouldn't need to set

>>> PYTHONPATH; pip and Python's USER_BASE should take care of this for you.

>>>

>>> First, you should check that pykwalify is installed, like this:

>>>

>>> $ pip3 show -f pykwalify | grep Location:

>>> Location: /home/foo/.local/lib/python3.6/site-packages

>>>

>>> If that doesn't work, reinstall west with pip3 to make sure you get it.

>>>

>>> Second, run "python3 -m site". The output should contain the pykwalify

>>> installation directory in sys.path. Something like this:

>>>

>>> $ python3 -m site

>>> sys.path = [

>>>     '/usr/local/lib/python3.6',

>>>     '/usr/lib/python36.zip',

>>>     '/usr/lib/python3.6',

>>>     '/usr/lib/python3.6/lib-dynload',

>>>     '/home/foo/.local/lib/python3.6/site-packages',

>>>     '/usr/local/lib/python3.6/dist-packages',

>>>     '/usr/lib/python3/dist-packages',

>>> ]

>>> USER_BASE: '/home/foo/.local' (exists)

>>> USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)

>>> ENABLE_USER_SITE: True

>>>

>>> Make sure:

>>>

>>> 1. USER_SITE is the directory where pykwalify was installed

>>> 2. ENABLE_USER_SITE is True

>>> 3. sys.path contains the directory where pykwalify was installed

>>>

>>> For more details, check:

>>>

>>> https://docs.python.org/3/library/site.html#site.USER_BASE

>>>

>>> >>

>>> >>

>>> >> I've googled it to solve the problem but i ended up here.

>>>

>>> By the way, for the future, please consider cutting and pasting text

>>> instead of using screenshots of your terminal window as discussed in

>>>

>>>

>>> https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste

>>>

>>> It makes it easier for others to google your exact error message.

>>>

>>> >>

>>> >> Can I have some advices?

>>>

>>> Hope this helps.

>>>

>>> Thanks,

>>> Marti

>>>

>>> >>

>>> >> (All programs I should install are beyond minimum version and I skipped

>>> >> set up a toolchain step because I set up the Zephyr SDK toolchains)

>>> >>

>>> >>

>>> >>

>>> >> Thanks,

>>> >>

>>> >> Jaemin

>>> >>

>>> >>

>>> >>

>>> >>

>>> >>

>>> >>

>>> >>

>>> >

>>> > --

>>> > *Allen Curtis*

>>> > Medical Device Architect

>>> > *Critical Software Solutions, LLC*

>>> >

>>> >

>>

>> --

>> *Allen Curtis*

>> Medical Device Architect

>> *Critical Software Solutions, LLC*

> --

> Allen Curtis

> Medical Device Architect

> Critical Software Solutions, LLC

>

 

 

 


Bolivar, Marti
 

Jaemin Choi <jaeminy.choi@...> writes:

The import error is solved due to you guys. Thank you.
Glad that part is resolved, sorry you're still (maybe) having problems.




1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed


These checklists should be added on the website I think.

I figured it out that USER_SITE wasn't the directory where pkywalify was installed.



To make them same, i reinstall python3 with this command

pip install python3 --user --force-reinstall

and also had to remove build directory to make it try to build new setting.



however, I faced another error when Im trying this same command.

west build -b reel_board samples/hello_world --pristine



these are new err message

Zephyr version: 2.0.99
-- Found PythonInterp: /usr/bin/python (found suitable version "3.7.1", minimum required is "3.4")
-- Selected BOARD reel_board
-- Found west: /home1/jaeminy.choi/.local/bin/west (found suitable version "0.6.2", minimum required is "0.6.0")
-- Loading /home1/jaeminy.choi/zephyr/zephyproject/zephyr/boards/arm/reel_board/reel_board.dts as base
-- Overlaying /home1/jaeminy.choi/zephyr/zephyproject/zephyr/dts/common/common.dts
Device tree configuration written to
/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/zephyr/include/generated/generated_dts_board.conf
Parsing Kconfig tree in /home1/jaeminy.choi/zephyr/zephyproject/zephyr/Kconfig
Loaded configuration '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/boards/arm/reel_board/reel_board_defconfig'
Merged configuration '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/samples/hello_world/prj.conf'
Configuration saved to '/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/zephyr/.config'
-- Cache files will be written to: /home1/jaeminy.choi/.cache/zephyr
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
CMake Error at ../../cmake/extensions.cmake:1326 (message):
Assertion failed: The toolchain is unable to build a dummy C file. See
CMakeError.log.
Call Stack (most recent call first):
../../CMakeLists.txt:44 (assert)

-- Configuring incomplete, errors occurred!
See also "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeOutput.log".
See also "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeError.log".
ERROR: command exited with status 1: /usr/local/bin/cmake -B/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build
-S/home1/jaeminy.choi/zephyr/zephyproject/zephyr/samples/hello_world -GNinja -DBOARD=reel_board



----------------------------------------------------------------------------------------------------------------------------------------------------





and these are the contents in /home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeError.log



Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags:

The output was:
1
/usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/b
in/ld: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr
-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/newlib/new
lib/libc/stdlib/exit.c:64: undefined reference to `_exit'
Is this still a problem for you? It looks like you are using the zephyr
SDK as your toolchain. I'm not sure why a newlib file is being linked in
for hello_world, though. That sample shouldn't be using newlib.

Thanks,
Marti

collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags:

The output was:
1
/usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr-eabi/b
in/ld: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/8.3.0/../../../../arm-zephyr
-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/home/buildslave/src/github.com/zephyrproject-rtos/sdk-ng/build/build_arm/.build/arm-zephyr-eabi/src/newlib/new
lib/libc/stdlib/exit.c:64: undefined reference to `_exit'
collect2: error: ld returned 1 exit status

--------------------------------------------------------------------------------------------------------------------------





these are the contents in home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles/CMakeOutput.log".



The target system is: Generic - 2.0.99 - arm
The host system is: Linux - 3.13.0-100-generic - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
Build flags:
Id flags: -c

The output was:
0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"

The C compiler identification is GNU, found in "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFiles
/3.15.2/CompilerIdC/CMakeCCompilerId.o"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/local/zephyr-sdk-0.10.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++
Build flags:
Id flags: -c

The output was:
0

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"

The CXX compiler identification is GNU, found in "/home1/jaeminy.choi/zephyr/zephyproject/zephyr/build/CMakeFil
es/3.15.2/CompilerIdCXX/CMakeCXXCompilerId.o"

Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Founda
tion)":
arm-zephyr-eabi-gcc (crosstool-NG 1.24.0-rc2-dirty) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.







----------------------------------------------------------------------------------





This below is the text error message you asked. (import error message)

jaeminy.choi@lion:~/zephyr/zephyrproject/zephyr (master)$ west build -b qemu_x86 samples/hello_world
-- west build: build configuration:
source directory: /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/samples/hello_world
build directory: /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/build
BOARD: qemu_x86 (origin: command line)
-- west build: generating a build system
Zephyr version: 2.0.0
CMake Warning at /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/app/boilerplate.cmake:160 (message):
The build directory must be cleaned pristinely when changing boards
Call Stack (most recent call first):
CMakeLists.txt:5 (include)

-- Selected BOARD reel_board
-- Found west: /home1/jaeminy.choi/.local/bin/west (found suitable version "0.6.2", minimum required is "0.6.0")
CMake Error at /home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/zephyr_module.cmake:45 (message):
Traceback (most recent call last):

File "/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/scripts/zephyr_module.py", line 19, in <module>
import pykwalify.core

ImportError: No module named 'pykwalify'

Call Stack (most recent call first):
/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/cmake/app/boilerplate.cmake:429 (include)
CMakeLists.txt:5 (include)

-- Configuring incomplete, errors occurred!
ERROR: command exited with status 1: /usr/local/bin/cmake -B/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/build
-S/home1/jaeminy.choi/zephyr/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=qemu_x86







--------- Original Message ---------

Sender : Bolivar, Marti <Marti.Bolivar@...>

Date : 2019-09-18 05:22 (GMT+9)

Title : RE: [Zephyr-devel] question in zephyrproject



"Kinder, David B" <david.b.kinder@...> writes:



Great!
We’re working on an updated getting started guide that streamlines this setup process so some important steps such as updating the
PATH are not missed (so easily).

Check out https://github.com/zephyrproject-rtos/zephyr/pull/19123
and the build artifacts for the GSG here:
https://builds.zephyrproject.org/zephyrproject-rtos/zephyr/19123/docs/getting_started/index.html


FWIW, recent versions of pip3 install will warn you if ~/.local/bin

(or wherever it installs packages with --user) are not on PATH, so

hopefully this problem will become less common as time goes on.



Comments appreciated.
-- david
From: devel@... <devel@...> On Behalf Of Lawrence King
Sent: Tuesday, September 17, 2019 12:40 PM
To: Allen Curtis <allen@...>; Bolivar, Marti <Marti.Bolivar@...>
Cc: devel@...; jaeminy.choi@...
Subject: Re: [Zephyr-devel] question in zephyrproject
I’m with Charles. I had to add this to my .bashrc
export PATH=~/.local/bin:$PATH
Once I did this everything is good.


That is a separate issue as described in the back and forth between

Carles and I.



Let's not confuse the PATH environment variable, which is used to locate

the executable "west" file, with sys.path, which is the variable

Python uses to locate importable modules. The latter can be augmented

using the PYTHONPATH environment variable, but it should not be

necessary if python and pip3 are configured properly (and using the

default configuration for at least Ubuntu and Arch in my testing).



Thanks,

Marti



Lawrence King
Principal Developer
+1(416)627-7302
From: devel@...<mailto:devel@...>
<devel@...<mailto:devel@...>> On Behalf Of Allen Curtis

Sent: Tuesday, September 17, 2019 3:36 PM
To: Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>>
Cc: devel@...<mailto:devel@...>;
jaeminy.choi@...<mailto:jaeminy.choi@...>

Subject: Re: [Zephyr-devel] question in zephyrproject
I did not see the “python -m site” in the instructions.
On Tue, Sep 17, 2019 at 12:33 PM Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>> wrote:
Allen Curtis <allen@...<mailto:allen@...>> writes:
Not my experience. The last time I installed the dependencies went into a
dotlocal directory under the user account. Python couldn’t find them.
What distro are you using? Did you try running python3 -m site as
described below to debug?
On Tue, Sep 17, 2019 at 12:12 PM Bolivar, Marti <Marti.Bolivar@...<mailto:Marti.Bolivar@...>>
wrote:
Hi Jaemin, Allen,
"Allen Curtis via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>"
<allen=criticalsoftwaresolutions.com@...<mailto:criticalsoftwaresolutions.com@...>>
writes:

I had this same problem. My solution was to export PYTHONPATH to include
the directory containing this module. If you went through the
instructions,
installing all the dependencies, it is installed on your system
somewhere.
Hmm, that shouldn't be needed if the Python dependencies were installed
correctly.
On Tue, Sep 17, 2019 at 4:16 AM via Lists.Zephyrproject.Org<http://Lists.Zephyrproject.Org>
<jaeminy.choi=
samsung.com@...<mailto:samsung.com@...>> wrote:
Hello.
This is Jaemin from Samsung Electronics and we are trying to set the
environment up for Zephyr with
https://docs.zephyrproject.org/latest/getting_started/index.html.
Everything went well with your manuals but when I try this one
west build -b reel_board samples/hello_world
(in my case west build -b qemu_x86 samples/hello_world )
The error which can't find pykwalify comes up like below.
Based on your screenshot, it looks like you are running on Linux, so you
should have installed west using "pip3 install --user west", which it
looks like you did:
-- Found west: /home/jaeminy.choi/.local/bin/west
If so, then pykwalify should have been installed too, because west
declares it as a dependency to pip:
$ pip3 show west | grep Requires:
Requires: colorama, PyYAML, pykwalify, configobj, setuptools
So as Allen said, if you have west but it can't import pykwalify, there
is a problem with the Python path. But you shouldn't need to set
PYTHONPATH; pip and Python's USER_BASE should take care of this for you.
First, you should check that pykwalify is installed, like this:
$ pip3 show -f pykwalify | grep Location:
Location: /home/foo/.local/lib/python3.6/site-packages
If that doesn't work, reinstall west with pip3 to make sure you get it.
Second, run "python3 -m site". The output should contain the pykwalify
installation directory in sys.path. Something like this:
$ python3 -m site
sys.path = [
'/usr/local/lib/python3.6',
'/usr/lib/python36.zip',
'/usr/lib/python3.6',
'/usr/lib/python3.6/lib-dynload',
'/home/foo/.local/lib/python3.6/site-packages',
'/usr/local/lib/python3.6/dist-packages',
'/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/foo/.local' (exists)
USER_SITE: '/home/foo/.local/lib/python3.6/site-packages' (exists)
ENABLE_USER_SITE: True
Make sure:
1. USER_SITE is the directory where pykwalify was installed
2. ENABLE_USER_SITE is True
3. sys.path contains the directory where pykwalify was installed
For more details, check:
https://docs.python.org/3/library/site.html#site.USER_BASE
I've googled it to solve the problem but i ended up here.
By the way, for the future, please consider cutting and pasting text
instead of using screenshots of your terminal window as discussed in
https://docs.zephyrproject.org/latest/guides/getting-help.html#use-copy-paste
It makes it easier for others to google your exact error message.
Can I have some advices?
Hope this helps.
Thanks,
Marti
(All programs I should install are beyond minimum version and I skipped
set up a toolchain step because I set up the Zephyr SDK toolchains)
Thanks,
Jaemin
--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*
--
*Allen Curtis*
Medical Device Architect
*Critical Software Solutions, LLC*
--
Allen Curtis
Medical Device Architect
Critical Software Solutions, LLC



*
*