Questions tagged [nuitka]

Nuitka is a Python compiler compatible with Python 2.6, 2.7, 3.2, 3.3, 3.4, and 3.5.

Right now Nuitka is a good replacement for the Python interpreter and compiles every construct that CPython 2.6, 2.7, 3.2, 3.3, 3.4, and 3.5 offer. It translates the Python into a C++ program that then uses "libpython" to execute in the same way as CPython does, in a very compatible way.

It is somewhat faster than CPython already, but currently it doesn't make all the optimizations possible, but a 258% factor on pystone is a good start (number is from version 0.3.11).

Future

In the future, Nuitka will be able to use type inference and guessing by doing whole program analysis and then applying the results to perform as many calculations as possible. It will do this - where possible - without accessing "libpython" but in C++ with its native data types.

It will also be possible to integrate "ctypes" based bindings without the normal speed penalty (the compiled program will call the C++ library in C++ directly).

159 questions
17
votes
4 answers

Can't compile Python using Nuitka

I'm trying to compile Python file which uses urllib.request, BeautifulSoup, and webbrowser. $ nuitka python.py Nuitka:WARNING:python.py:16: Cannot find 'urllib.request' as relative or absolute import. Nuitka:WARNING:python.py:17: Cannot find 'bs4'…
George J
  • 355
  • 2
  • 14
15
votes
4 answers

Compile Python 3.6 script to standalone exe with Nuitka on Windows 10

Note: Before marking this question as duplicate, please verify that the other question answers the topic for this setup: OS: Windows 10, 64-bit Python version: 3.6 or higher Python Compiler: Nuitka, development version 0.5.30rc5 MSVC compiler:…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
15
votes
2 answers

PyPy vs. Nuitka

During the last days, I was toying around with Nuitka, a tool that compiles Python into executable C/C++ programs. I have not found any speed advantage of Nuitka (compared to PyPy). What is the meaning of Nuitka, then? Am I missing something?
user258532
  • 511
  • 5
  • 11
15
votes
2 answers

Nuitka error Cannot find ' ' in package ' ' as absolute import

I'm trying to use the nuitka tool to turn my python program into executable on ubuntu. It works fine if the program doesn't have any import statements but breaks when I use it on a program that imports something e.g. test.py import numpy print…
Lightsout
  • 3,454
  • 2
  • 36
  • 65
10
votes
2 answers

How to programatically detect if code is running in nuitka compiled or python interpreted mode

Can anyone say how to detect if code is running in an exe created by Nuitka or in a normal python interpreter? I think I would ideally like an "is_nuitka" flag that would be set to True when compiled and presumably not exist at all when not…
Ron
  • 522
  • 1
  • 3
  • 16
8
votes
0 answers

Nuitka Dependancy Error

I'm trying to compile a simple standalone python application using Nuitka. I was able to do this using just the standard library. I'm now looking to bring in some extra dependancies but I am now receiving errors from Nuitka I'm unable to…
freebie
  • 2,161
  • 2
  • 19
  • 36
7
votes
2 answers

What is the equivelant of add-data (Pyinstaller) for Nuitka?

I am trying to compile a python file with Nuitka in stead of Pyinstaller. Everything is going great except for the facts that I do not understand how I should add another data file to the python file. The problem If I want to add an image to my…
Coder
  • 159
  • 1
  • 9
7
votes
1 answer

How to build windows xp application using Visual studio command line + SCons?

Building a windows xp application using Visual Studio 2015 IDE isn't hard at all, you just need to use the right platform toolset (v120_xp or v140_xp) and just make sure you install the proper redistributable visual studio runtime dlls on the target…
BPL
  • 9,632
  • 9
  • 59
  • 117
7
votes
3 answers

is compiled python file under debian is compatible with ubuntu

I'm using nuitka to compile my python codes. I use --module option to import my code inside other python files: nuitka --module --recurse-none file.py Output: file.so If I don't need to import the code and just need to run on terminal, I'm…
JayGatsby
  • 1,541
  • 6
  • 21
  • 41
7
votes
1 answer

Nuitka with Numpy fails "ImportError: LoadLibraryEx multiarray failed"

I am trying to build an executable with Nuitka, for the following simple code: from numpy import abs var = raw_input("Please enter something: ") print "you entered", var print abs(-43.2) var2 = raw_input("Secundo: ") print var2 The Nuitka…
Andreas O
  • 239
  • 1
  • 4
  • 15
7
votes
1 answer

Nuitka on Windows

Having problems to compile hello-world.py using Nuitka on windows. The command I am using is: nuitka --standalone --portable --remove-output --recurse-all --python-version=3.4 hello_world.py The error is: WindowsError: [Error 2] The system cannot…
Ron
  • 522
  • 1
  • 3
  • 16
6
votes
2 answers

Can I create single file executable with nuitka?

As title says, can I create single file executable with nuitka? I tried --portable and --standalone option but they does not seem to work. And can anyone please explain me what is the --recurse-all option? And if you have some other recommendations…
Jakub Bláha
  • 1,491
  • 5
  • 22
  • 43
6
votes
1 answer

How can I use nuitka with virtualenv

I am using nuitka for my project. It has some 3rd party modules as dependencies and I am using virtualenv. How can I use nuitka with virtualenv?
user3831140
6
votes
1 answer

Problems on creation of executable file from python with Nuitka

I am trying to create an exe file from a python file that it will be executable to other PCs. I came across Nuitka.I use Python 2.7.11 Anaconda 2.3.0 (32 bit) on Windows 8.1 64 bit. Because of my work specs i can't update my Python version!!! I have…
thanvaf
  • 329
  • 3
  • 7
5
votes
0 answers

Error using Nuitka for Python App that uses Numpy, Pandas and Plotly

I've developed a PyQT5 app that also uses Numpy, Pandas and Plotly. To package it up I decided to use Nuitka however since the product is for the end users who won't be familiar with Python, I want to make sure the interpreter is packaged up along…
JackSparrow123
  • 1,360
  • 2
  • 18
  • 23
1
2 3
10 11