ImportError: нет модуля с именем bb
Создать мир призраков .ipk
package, as described here, I cloned bitbake
а также OpenEmbedded
как
git clone git://git.openembedded.org/bitbake
git clone git://git.openembedded.org/openembedded
Then exported following varibales
export OEBASE=/media/sda3/open_env/
export PATH=$OEBASE/bitbak/ebin:$PATH
export BBPATH=$OEBASE/build:$OEBASE/openembedded
export BB_ENV_EXTRAWHITE="OEBASE"
When I run following command I get error given below:
bitbake -b packages/myhelloworld/myhelloworld_0.1.bb
Traceback (most recent call last):
File "/usr/bin/bitbake", line 35, in <module>
import bb
ImportError: No module named bb
I am doing this on ubuntu 10.04
, Что мне здесь не хватает?
РЕДАКТИРОВАТЬ:
As given in answer, I executed following commands and getting error as given below:
git clone git://git.openembedded.org/openembedded-core
cd openembedded-core
git clone git://git.openembedded.org/bitbake
cd ..
git checkout dylan
cd bitbake
git checkout 1.18
cd ..
. oe-init-build-env
модифицированный build/conf/local.conf
и создал myhelloworld
режиссёр openembedded-core/build/
dir and then executed
bitbake myhelloworld/
I am getting errors as:
Traceback (most recent call last):
File "/media/sda3/open_env/openembedded-core/bitbake/bin/bitbake", line 34, in <module>
import bb
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py:104: RuntimeWarning: Parent module 'bb' not found while handling absolute import
from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Error in sys.exitfunc:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Pseudo is not present but is required, building this first before the main build
Traceback (most recent call last):
File "/media/sda3/open_env/openembedded-core/bitbake/bin/bitbake", line 34, in <module>
import bb
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py:104: RuntimeWarning: Parent module 'bb' not found while handling absolute import
from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Error in sys.exitfunc:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Traceback (most recent call last):
File "/media/sda3/open_env/openembedded-core/bitbake/bin/bitbake", line 34, in <module>
import bb
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py:104: RuntimeWarning: Parent module 'bb' not found while handling absolute import
from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
Error in sys.exitfunc:
Traceback (most recent call last):
File "/home/python-2.7.3/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/event.py", line 104, in print_ui_queue
from bb.msg import BBLogFormatter
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 38, in <module>
import bb.persist_data, bb.utils
File "/media/sda3/open_env/openembedded-core/bitbake/lib/bb/persist_data.py", line 35, in <module>
from pysqlite2 import dbapi2 as sqlite3
ImportError: No module named pysqlite2
2 ответа
Вы смешиваете недавний битбейк с OpenEmbedded classic; пожалуйста, не делай этого. Вы также пытаетесь настроить среду сборки вручную, избегайте этого. Любая новая разработка должна основываться на OpenEmbedded Core.
Что ты должен делать:
Клонировать репозитории.
git clone git://git.openembedded.org/openembedded-core cd openembedded-core git clone git://git.openembedded.org/bitbake
Если вы хотите использовать определенную ветку, например, Jethro
git checkout jethro cd bitbake git checkout 1.28 cd ..
Настройте среду сборки:
. oe-init-build-env
Настройте сборку.
Т.е. установить правильную машину и т. Д. В
build/conf/local.conf
,Построить!
Теперь делай то, что хочешь, например, любой из:
bitbake core-image-minimal bitbake myehelloworld
Обновление: обратите внимание, что последний выпуск (из Poky
, что официально было проверено Ubuntu 10.04
было Dylan
). Более поздние выпуски вполне могут иметь проблемы на этом хосте, я бы порекомендовал обновить их до более новой LTS-версии.
Обновление 2: ваша новая ошибка говорит ImportError: No module named pysqlite2
, Bitbake сначала будет искать sqlite3
, Установите это на свой build-host apt-get install libsqlite3-dev
Вам не хватает модуля bb. Вам нужно установить все зависимости из файла требований или вручную с помощью pip. Это может помочь вам. http://python-packaging-user-guide.readthedocs.org/en/latest/installing/