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.

Standalone distribution doesn't allow using module mode, doesn't include data files for implicit dependencies

See original GitHub issue

See #492 for environment details

Nuitka command line:

poetry run python -m nuitka --standalone --recurse-all --python-flag=no_site --show-progress --show-scons blender_renderfarm
> .\blender_renderfarm.exe render
Traceback (most recent call last):
  File "D:\git\blender-renderfarm\blender_renderfarm.dist\__main__.py", line 14, in <module>
  File "D:\git\blender-renderfarm\blender_renderfarm.dist\fire\core.py", line 138, in Fire
  File "D:\git\blender-renderfarm\blender_renderfarm.dist\fire\core.py", line 466, in _Fire
  File "D:\git\blender-renderfarm\blender_renderfarm.dist\fire\core.py", line 675, in _CallAndUpdateTrace
  File "D:\git\blender-renderfarm\blender_renderfarm.dist\__main__.py", line 6, in render
ImportError: cannot import name 'render' from '__main__' (D:\git\blender-renderfarm\blender_renderfarm.dist\__main__.py)

Currently bypassing this with try/except on the imports, but maybe Nuitka should compile the executable for it to work the same way as if the module was ran with python -m

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Dec 15, 2021

Nuitka has gained support for building wheels with setuptools, and it can include files inside the compilation result itself, consider https://nuitka.net/pages/commercial.html and https://nuitka.net/doc/user-manual.html#use-case-5-setuptools-wheels which will both solve this.

0reactions
jayvdbcommented, Sep 25, 2019

fwiw, I created https://github.com/Nuitka/Nuitka/issues/523 which appears to be fairly similar.

About data of implicit dependencies, I think it is very risky to exclude them by default. Ideally the output shows which data files are being included , and there is a extra set of flags to specify which deps can be stripped of their data. Extra fine tuning (e.g. rules like keep only one file from subdep_x) should probably be done after nuitka has finished. (misunderstood auxiliary part of issue)

Read more comments on GitHub >

github_iconTop Results From Across the Web

3.4. Prevent a Module Being Implicitly Loaded
This task describes how to configure your application to exclude a list of module dependencies. You can configure a deployable application to prevent...
Read more >
Implicit Dependency - an overview | ScienceDirect Topics
We will describe each module and list any and all its dependencies. All IIS features have an implicit dependency with their parent. For...
Read more >
Package Discovery and Namespace Packages - Setuptools
If you are using auto-discovery with flat-layout, setuptools will refuse to create distribution archives with multiple top-level packages or modules. This is ......
Read more >
Learning the Basics - Gradle User Manual
This process is called dependency resolution. You can find a detailed discussion in How Gradle downloads dependencies.
Read more >
Developer Guide - WildFly Documentation
Deployments in WildFly are also modules, and do not have access ... that are added, please see Implicit module dependencies for deployments.
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