Nuitka on Windows

Problems compiling hello-world.py using Nuitka on windows.

The command I use is:

nuitka --standalone --portable --remove-output --recurse-all --python-version=3.4 hello_world.py

Mistake:

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)

The same code compiles and works fine on Linux. The same code works fine in the windows interpreter.

The files mentioned in the error message do exist. Any suggestions?

Using Win7. Python 3.4 (Anaconda x64). Using MinGW.

+4
source share
1 answer

OK, for those who have the same error, here is the answer to my question:

MinGW . MSVC2010. , Python 3.4 Windows (. https://docs.python.org/3.4/using/windows.html#compiling-python-on-windows).

Nuitka python 3.4 MSV++ 2010 Win7 64bit:

MSVC2010:
1. https://wiki.qt.io/How_to_setup_MSVC2010
2. http://uk.mathworks.com/matlabcentral/answers/95039-why-does-the-sdk-7-1-installation-fail-with-an-installation-failed-message-on-my-windows-system

:

C.

  1. 64- , , , . (. : http://www.w7forums.com/threads/vcvarsall-bat-no-64bit-support-vcvars64-bat-missing.6606/)
    : C:\Program Files (x86)\Microsoft Visual Studio 10.0\vc\bin\amd64\vcvars64.bat CALL "C:\Program Files\Microsoft SDK\Windows\v7.1\Bin\SetEnv.cmd" /x 64

  2. :
    "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall" amd64
    .
    (. , amd64: https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx)

  3. : ( , cmd )
    cl hello.c
    ( hello.c)

  4. :
    hello.exe

C .

  1. python 2.7: (Nuitka , python 3.x)
    python-2.7.6.amd64.msi ( https://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi)

  2. python 3.4: ( Anaconda Windows)
    Anaconda3-2.3.0-Windows-x86_64.exe ( https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.3.0-Windows-x86_64.exe)

  3. Nuitka: ( http://nuitka.net/pages/download.html)
    Nuitka-5.1.143.win-amd64.py34.msi ( http://nuitka.net/releases/Nuitka-5.1.143.win-amd64.py34.msi)

!

  1. Nuitka: ( hello.py)
    "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall" amd64
    nuitka --standalone - portable hello.py
    cd hello.dist
    hello.exe

nuitka : "Nuitka Dependency Walker (http://dependencywalker.com) Python APPDATA ( , , ). ? []/". "", .

, , . , . , .

+7

Source: https://habr.com/ru/post/1611446/


All Articles