Code Monkey home page Code Monkey logo

Comments (5)

Wandar avatar Wandar commented on May 22, 2024

应该只支持纯python的库

from kbengine.

ve-i-uj avatar ve-i-uj commented on May 22, 2024

应该只支持纯python的库

You can use any python library in assets, but you must build or install the library with an external python (not kbe python). The external python must have the same version like the kbe python (Python 3.7.3 for KBEngine v2.5.12). Then copy the installed library to the kbengine python import directory (site-packages).

from kbengine.

ve-i-uj avatar ve-i-uj commented on May 22, 2024
第三方库不能使用的问题 #1562

python环境是 3.7.3 我将安装好的第三方库文件在Python37\Lib\site-packages下 复制到 kbengine-2.5.11\kbe\res\scripts\common\Lib\site-packages文件夹下

然后在脚本中导入该库启动keb时报错 在我本地这个库是能正常使用的,所以排除是版本不对的原因 kbe使用第三方库是这么操作的吗 希望好心人帮帮忙 1654580367441 1654580840628

I added numpy and lxml to my kbengine project and they worked fine. But my project was hosted on Linux, so the Python libraries were also built on it. I also added the libraries path to sys.path in the kbengine.py on startup. Maybe that matters too.

leto@leto:~/pioner-assets$ ls -la scripts/site-packages/
итого 88
drwxr-xr-x  6 leto leto  4096 авг 20  2019 .
drwxr-xr-x 15 leto leto  4096 авг  9 08:58 ..
-rw-r--r--  1 leto leto  4277 июл 30  2019 cached_property.py
drwxr-xr-x  2 leto leto  4096 июл 30  2019 frozendict
drwxr-xr-x  5 leto leto  4096 июл 30  2019 lxml
drwxr-xr-x 18 leto leto  4096 авг  9 09:11 numpy
-rw-r--r--  1 leto leto 54063 июл 30  2019 pydot.py
drwxr-xr-x  4 leto leto  4096 июл 30  2019 py_trees

from kbengine.

sun1284065663 avatar sun1284065663 commented on May 22, 2024

可能是因为我使用了fcl库 这个库不是纯Python的 fcl是C++写的 Python封装了一层

from kbengine.

Wandar avatar Wandar commented on May 22, 2024

应该只支持纯python的库

You can use any python library in assets, but you must build or install the library with an external python (not kbe python). The external python must have the same version like the kbe python (Python 3.7.3 for KBEngine v2.5.12). Then copy the installed library to the kbengine python import directory (site-packages).

Thank you for sharing.

from kbengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.