Giter Site home page Giter Site logo

Comments (6)

clayboone avatar clayboone commented on July 17, 2024

I don't know what Nuitka is, but based on that output, it looks like it uses the direct package. Ursina also uses this package and it looks like you've made your module inside of the Ursina root folder. This is a good way to ensure import problems.

Can you test this by moving your script to some other location? Or try replicating it without using Nuitka?

These might be obvious or impossible questions, but I'm curious to know if this is a challenge for Ursina or Nuitka, or if it's just a local configuration issue.

from ursina.

jbdoderlein avatar jbdoderlein commented on July 17, 2024

Nuitka is one of the best compilers for python, and I didn't see that there was a script to build an application in ursina. My script is not in the ursina files. This problem seems to be more related to Ursina because I also tested with pyinstaller, and I end up with the same error. I'll try to compile ursina alone.

P.S: The idea to use nuitka came from @pokepetter who had made a tweet, and who also answered me.

Thanks for the help :)

from ursina.

clayboone avatar clayboone commented on July 17, 2024

Well I can at least confirm this: I've just tried with PyInstaller 3.6 and got the same result as you.

from ursina.

jbdoderlein avatar jbdoderlein commented on July 17, 2024

Ok it seems that the problem is from panda3d, I tested the compilation of a panda3d sample with the same parameters, and I get the same error.

from ursina.

clayboone avatar clayboone commented on July 17, 2024

Looks like we had the same idea. I just came to report that failure as well. Additionally, when I try out the python -m ursina.build, I get some unicode error. That should probably be another ticket, but I think we can close this one for now.

This is a Panda3d limitation and, based on their documentation, not likely to be fixed.

from ursina.

jbdoderlein avatar jbdoderlein commented on July 17, 2024

I'm going to close this ticket because in the end I found the solution to my problem (making the games developed with ursina distributable)
I'm putting here the latest research and tests I've done, if anyone wants to take it over later:

After several tests I've managed to get nuitka to work with the basic example of panda3d (that horrible panda that spins)
For this I had to do several manual manipulations after the nuitka execution:
The first error comes from the lack of panda3d configuration files in the compilation. So I moved the /etc/ folder with its two configuration files into the dist directory. ( panda3d location $PYTHON_PATH$\Lib\site-packages\panda3d )
Then, the problem is that it doesn't find the display libs (libpandagl.dll), so I added these lines in the configuration :

plugin-path   $MAIN_DIR
plugin-path   $THIS_PRC_DIR/..
plugin-path   $THIS_PRC_DIR/../lib

I then moved libpandagl to the dist directory.
I then got the following error :

:display(warning): Unable to load libpandagl.so: Module not found

To solve this I moved all the files (.dll and .pyd) in the dist directory. And it all worked.
I couldn't reproduce the result with ursina, strange bug on missing variables in the code.

Thanks for the help!

from ursina.

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.