Skip to contentSkip to conversation

meta-intel-fpga layer support

nanbield [email protected] 2 participants 4 messages Nov 3, 2023 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello dear community,

I was trying to use django recipe with core-image-minimal system file (poky langdale release) because it supports meta-intel-fpga layer.

In order to work with django I need also virtualenv library. The only virtualenv available on langdale release is virtualenv v1.11.4 ( https://layers.openembedded.org/layerindex/recipe/341147/ ) and unfortunately, it seems not compatible with python3 from the same langdale release which is python3 v3.10.6 ( https://layers.openembedded.org/layerindex/recipe/325778/ ) ! I say this is not compatible, because when I run "virtualenv env" in prompt it outputs me the following :

Quoted 55 lines

New python executable in env/bin/python3

Not overwriting existing python script env/bin/python (you must use env/bin/python3)

Traceback (most recent call last):

File "/usr/bin/virtualenv", line 8, in <module>

sys.exit(main())

File "/usr/lib/python3.10/site-packages/virtualenv.py", line 815, in main

create_environment(home_dir,

File "/usr/lib/python3.10/site-packages/virtualenv.py", line 982, in create_environment

py_executable = os.path.abspath(install_python(

File "/usr/lib/python3.10/site-packages/virtualenv.py", line 1459, in install_python

fix_local_scheme(home_dir, symlink)

File "/usr/lib/python3.10/site-packages/virtualenv.py", line 1530, in fix_local_scheme

Quoted 8 lines

if sysconfig._get_default_scheme() == 'posix_local':

AttributeError: module 'sysconfig' has no attribute '_get_default_scheme'. Did you mean: 'get_default_scheme'?

Especially the last line "...module 'sysconfig' has no attribute '_get_default_scheme'..."
From this post on stack overflow ( https://stackoverflow.com/questions/71522731/unable-to-activate-virtual-environment-in-python ) , it seems that virtualenv version is too old and must be upgraded.

I know that pip recipe can be added, but not sure if poky is made to run "pip install --upgrade virtualenv" ? Should I try this ?

Also the easiest solution would be to use poky nanbield release, because it provides newest virtualenv v.20.24.5 ( https://layers.openembedded.org/layerindex/recipe/352609/ ). But unfortunately I didn't find "meta-intel-fpga" layer support on this release ?

What do you think I should do in order to be able to run virtualenv ?

#1 lore raw
Quoted 1 line · roman.leduc via lists.yoctoproject.org

In order to work with django I need also virtualenv library.

Use venv instead, this is part of python3 itself.

Ross

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Re: Private: Re: [yocto] [nanbield] meta-intel-fpga layer support

Please don’t mail directly, keep discussion on the list.

Quoted 12 lines · On 3 Nov 2023, at 18:56, [email protected] wrote:

Thank you for your answer, you are right venv is part of python3, I tried venv in many ways but my system doesn't recognizes it :

$:~# python3 -m venv env
/usr/bin/python3: No module named venv.__main__; 'venv' is a package and cannot be directly executed
$:~# python3 venv env
/usr/bin/python3: can't find '__main__' module in '/home/root/venv'

I tried with python and python 3.10 aswell , same answer.

Actually I tried any other module (such as numbers, pickle, audio, sqlite3,...) and it will give the same error, it seems I don't have any module that can be found, I'm only able to launch python3 shell. Might this be related to wrong environment variable ?

Most modules can’t be executed directly, but venv should be able to.

This is likely a missing dependency in the packaging. Can you confirm that you’ve installed python3-modules into your image to bring in _all_ of the standard library?

Ross

#4 lore raw

Re: Private: Re: [yocto] [nanbield] meta-intel-fpga layer support

Yes sorry, new here as new with yocto,

Actually I discovered yocto through guides along with intel fpga-soc boards. These guides specify briefly how to use bitbake to build our system file based on poky, and add existing recipes/layers.

All what I did is the following :

- I want recipe "django" which depends on layers "openembedded-core", "meta-python", "meta-oe".
- I git clone in my folder the "meta-openembedded" repo that contains "meta-python" and "meta-oe". I don't clone "openembedded-core" since it is already included (partially) in "poky" from what I understood.
- I add django to my local.conf  : CORE_IMAGE_EXTRA_INSTALL += " django "
- I add layers to my bblayers.conf : BBLAYERS += " ${TOPDIR}/../meta-openembedded/meta-python "
: BBLAYERS += " ${TOPDIR}/../meta-openembedded/meta-oe "
- and I build the systemfile with bitbake "core-image-full-cmdline" for instance (it can either be core-image-minimal, I guess this doesn't affect behavior on adding packages)

I didn't modify anything else beside adding these lines in my .conf files, since guide I was following didn't mention something else necessary. Did I miss a step for adding modules of a recipe ? I thought they were all included by default.

I might mention but I suppose it doesn't affect something, I changed ' MACHINE = "arria10" ' in local.conf which is my fpga-soc device.

Thanks again,