当我运行poky / build $ source toaster start
时出现以下错误。
The system will start.
Traceback (most recent call last):
File "/home/siva/yocto/Morty/poky/bitbake/bin/../lib/toaster/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
......
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/siva/.local/lib/python3.5/site-packages/django/contrib/contenttypes/apps.py", line 7, in <module>
from .management import update_contenttypes
ImportError: cannot import name 'update_contenttypes'
我已经看到了以下链接,但我认为这与此不相符。
答案 0 :(得分:1)
我相信你正在使用像krogoth和morty这样的两个yocto来源。
krogoth
取决于python2和pip
morty
取决于python3和pip3
它可能会让事情变得混乱。所以请使用以下命令:
rm -rf /home/siva/.local/lib/python3.5/site-packages/django
答案 1 :(得分:0)
你可以这样导入,
from YourPackageName.management import update_contenttypes