nuitka

How to get the current path of compiled binary from Python using Nuitka?

老子叫甜甜 提交于 2020-01-04 06:15:30
问题 Nuitka is good at compiling Python to excutable binary. But the compiled binary finds other resource files from original absolute path. Thus, for moving to another computer requires to make the directory tree same as the original one. For example, if I compile a project like this: /home/me/myproj/ ╠═ myprog.py ╚═ resource ╚═ foo.data I should put the resulting binary and resource to the same location of another computer. How to solve this problem? My simpler spike is: # /home/me/myproj/spike

How to get the current path of compiled binary from Python using Nuitka?

狂风中的少年 提交于 2020-01-04 06:15:07
问题 Nuitka is good at compiling Python to excutable binary. But the compiled binary finds other resource files from original absolute path. Thus, for moving to another computer requires to make the directory tree same as the original one. For example, if I compile a project like this: /home/me/myproj/ ╠═ myprog.py ╚═ resource ╚═ foo.data I should put the resulting binary and resource to the same location of another computer. How to solve this problem? My simpler spike is: # /home/me/myproj/spike

Nuitka-compiled web app raises error on exit

痴心易碎 提交于 2020-01-04 06:14:22
问题 I am working on a real-time 3d web application project. It is built on top of Bottle and Gevent (using bottle-websocket plugin). After compilation using Nuitka, our dev server works fine except one: raises error on Ctrl+C exit. The error output is shown below $ ./__main__.bin server Bottle v0.12.18 server starting up (using GeventWebSocketServer())... Listening on http://0.0.0.0:8080/ Hit Ctrl-C to quit. ^CKeyboardInterrupt 2019-12-20T17:05:28Z /usr/lib/python3/dist-packages/apport/report.py

Problems on creation of executable file from python with Nuitka

杀马特。学长 韩版系。学妹 提交于 2019-12-23 09:46:51
问题 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 download nuitka 0.5.19 for python 2.7. At first i used the simple line nuitka --exe python.py and i get an executable (with some warnings) that runs only in PCs that had install Python (obvious!). Then i used nuitka --standalone python.py in order

Python 3.5 + PyQt5 to standalone exe

佐手、 提交于 2019-12-20 03:40:27
问题 I'm new to coding and I need to transform my py file to an exe. I tried py2exe and it didn't work with python 3.5. Then I tried pyinstaller and it worked, but when I added PyQt5 to the program, pyinstaller also failed. I tried nuitka, and it builds the exe, but when I click on the exe file it shows a console for a few seconds and closes. I need an exe which shows a gui after being activated. Here are the modules that I used in the program: import P4 import time from datetime import datetime

Can't compile Python using Nuitka

萝らか妹 提交于 2019-12-10 12:49:34
问题 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' as relative or absolute import. $ ./python.exe Traceback (most recent call last): File "python.py", line 16, in <module> from urllib.request import urlopen ImportError: No module named request 回答1: I got some similar looking error messages. Did you

python package compiled with nuitka fails with segmentation fault

不羁的心 提交于 2019-12-10 12:12:31
问题 I'm developing an embedded device controlled by a python2.7 script. And I need to compile the source for both security (I don't want device users to mess with my sources) and performance (I'm working on an BeagleBone Black, ARM microPC, and it's pretty short on CPU/RAM). I'm using Nuitka python compiler for this. I've tried compiling separate modules of my application and it works fine, I can transparently replace random .py with it's compiled .so analogue and it all works fine. Yet if I try

Nuitka not compiling an exe with nuitka --recurse-all hello.py [error]

邮差的信 提交于 2019-12-07 14:45:37
问题 I am trying to create a simple exe through nuitka so that I can run it on my laptop without Python needing to be installed. I am on windows 10 and using Anaconda Python 3. I typed in: nuitka --recurse-all hello.py However, I keep getting the following error message: C:\Users\Bain3>Nuitka --exe 123.py Nuitka:WARNING:Not recursing to 'selenium' (C:\Users\Bain3\Anaconda3\Lib\site-packages\selenium), please specify --recurse-none (do not warn), --recurse-all (recurse to all), --recurse-not-to

Nuitka on Windows

五迷三道 提交于 2019-12-06 04:36:16
问题 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 find the file specified: File "C:\Users\win_user\Anaconda3\Lib\site-packages\nuitka\build\SingleExe.scons", line 866: shell = False File "c:\Python27\lib\subprocess.py", line 709: errread, errwrite) File "c:\Python27\lib\subprocess.py", line 957:

Nuitka on Windows

旧城冷巷雨未停 提交于 2019-12-04 07:54:28
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 find the file specified: File "C:\Users\win_user\Anaconda3\Lib\site-packages\nuitka\build\SingleExe.scons", line 866: shell = False File "c:\Python27\lib\subprocess.py", line 709: errread, errwrite) File "c:\Python27\lib\subprocess.py", line 957: startupinfo) Same code compiles & runs fine on Linux. Same code runs fine in interpreter on windows. The