question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pony and nuitka or pyinstaller

See original GitHub issue

I am trying to make a standalone version of my python 2.7.12 program using the compiler nuitka and I also tried it with the freezer pyinstaller. But they fail on line 200 in pony\utils\utils.py which says:

def import_module(name):
    "import_module('a.b.c') -> <module a.b.c>"
    mod = sys.modules.get(name)
    if mod is not None: return mod
    mod = __import__(name)            # <------------- line 200
    components = name.split('.')
    for comp in components[1:]: mod = getattr(mod, comp)
    return mod

If I understand correctly, they cannot handle these import statements very well. I think it would be nice if pony is compatible with these tools which requires probably a different implementation of this import_module function. Any chance this will become available or otherwise, maybe some workarounds?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
jgirardetcommented, Jan 27, 2020

I have the same probleme. I just manually import it: https://github.com/jgirardet/mydevoirs/blob/master/mydevoirs/database/models.py

0reactions
JackLilhammerscommented, Sep 16, 2020

@jgirardet Thank you! It’s not a fix, but you saved my day.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How does this compare to pyinstaller or nuitika? - Hacker News
PyOxidizer and pyinstaller are rather bundlers that build a CPython interpreter and all your dependencies into a single binary. There is also https://github.com ......
Read more >
Python script distribution on Windows - options to avoid virus ...
pyinstaller from pip, pyinstaller with local-compiled bootloader, py2exe, and nuitka are the various .exe-builders I've tried so far.
Read more >
Python to executable : r/learnpython - Reddit
There's py2exe, but in all honesty - Pyinstaller is the most reliable module I've used for creating an exe.
Read more >
All in with Nuitka - Brian Lovin
But python code as a statically compiled native executable is really cool, compared to other solutions like using pyInstaller. kashif. Your link ...
Read more >
AV flags this as malware - Lovely Composer community - itch.io
I changed the executable file creation tool from PyInstaller to Nuitka. As a result, the number of cases detected by antivirus has decreased ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found