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.

Poetry compat: HelloWorld does not print on stdout

See original GitHub issue
> poetry run python -m nuitka --version

0.9.6
Commercial: None
Python: 3.9.12 (tags/v3.9.12:b28265d, Mar 23 2022, 23:52:46) [MSC v.1929 64 bit (AMD64)]
Flavor: Unknown
Executable: C:\Users\LeimgruberF\dev\nuitka-poetry\.venv\Scripts\python.exe
OS: Windows
Arch: x86_64
WindowsRelease: 10

Installed Python via pyenv-win and Nuitka via Poetry (poetry add --dev nuitka). Poetry manages a virtual environment and runs all poetry run ... commands in that environment.

Ran Nuitka on the HelloWorld example from the user manual:

> poetry run python -m nuitka .\hello.py --mingw64

Nuitka-Options:INFO: Used command line options: .\hello.py --mingw64
Nuitka-Options:WARNING: You did not specify to follow or include anything but main program. Check options and make sure that is intended.
Nuitka:INFO: Starting Python compilation with Nuitka '0.9.6' on Python '3.9' commercial grade 'not installed'.
Nuitka:INFO: Completed Python level compilation and optimization.
Nuitka:INFO: Generating source code for C backend compiler.
Nuitka:INFO: Running data composer tool for optimal constant value handling.
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: gcc (gcc).
Nuitka-Scons:INFO: Backend linking program with 9 files (no progress information available).
Nuitka-Scons:INFO: Compiled 36 C files using ccache.
Nuitka-Scons:INFO: Cached C files (using ccache) with result 'cache miss': 9
Nuitka:INFO: Keeping build directory 'hello.build'.
Nuitka:INFO: Successfully created 'hello.exe'.

But then a .\hello.exe returns with an exit code -10737415150 and without printing anything on STDOUT. Any ideas on how to debug this further? I am at a loss.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kayhayencommented, Jul 28, 2022

If you want to transfer to another machine, you need to use standalone mode, otherwise it’s expected to not work. If you create it accelerated inside a virtualenv, you need to run it in there too. For some Python installations, where the DLL is not accessible, a CMD file is created that provides the environment. Potentially it needs to for virtualenv persistence of PYTHONPATH etc. but for you there, poetry run hello.exe would be needed.

0reactions
kayhayencommented, Aug 1, 2022

So, I added the trace to the output on factory branch. It’s an important enhancement, but largely unrelated to anything in the issue specifics, therefore I am closing it. I do believe on Linux, the virtualenv environment still needs preservation, but this is about Windows, where it’s expected to be worked around already be the “uninstalled” Python mechanism.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >
print("Hello World") returns no output in iPython - Stack Overflow
print ("hello world") returns None and prints at stdout, the interactive shell prints the repr() of the return value, in no version of ......
Read more >
Goal rules - Pants build
Precisely, this causes the engine to request the type HelloWorld , which results in running the @goal_rule hello_world . Console : output to...
Read more >
Questionary
Questionary uses Poetry for packaging and dependency management. ... can not be submitted until the validator accepts it (e.g. to check minimum password ......
Read more >
Advanced Bash-Scripting Guide
There is not even a single best language; there are only languages ... Passes the output (stdout) of a previous command to the...
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