2

I'm using windows and python2.7

I've made a .py application and I'm trying to figure how to convert into an executable. I read that the package nuitka can do this

But I don't understand how to do it. Instructions are on this page http://nuitka.net/doc/user-manual.html#overview.

It says to use this: "nuitka --recurse-all program.py"

How do i use this command?

I put it into a command prompt and it said "nuitka is not defined". I opened a command prompt and entered "python" and then the code and it said "Syntax Error" I tried to import nuitka (And it did recognise it when I typed "Import Nuitka") but I still only got errors.

I think it's obvious that I haven't learnt something quite fundamental and most documentation seems to start off at a point that I am not at. Could anyone explain this?

Thank you for your time.

Ok thank you for your response. I still haven't got it working. Is the "Path" the directory that it says in the command prompt? The default being "C:\WINDOWS\system32"? I tried changing it to both "C:\Python27\Lib\site-packages" and "C:\Python27\Lib\site-packages\nuitka" but neither of those worked. I also tried changing the Environment variables "PATH" to either of those. And then I tried typing PATH= either of those directly from the command prompt but I still couldn't make any progress.
Am I using PATH wrong or am I giving it the wrong directory?

ooh ok I was using the wrong directory. I searched for the nuitka --run and it was here "C:\Users*Myname*\Documents\Pythonstuff\Scripts"

Sooo.. I did "cd C:\Users*Myname*\Documents\Pythonstuff\Scripts" and then "nuitka --recurse-all program.py" into command prompt and it recognised the command but came up with a few errors. But that's almost fixed.

Limon Monte
  • 44,025
  • 43
  • 163
  • 189
DCp
  • 23
  • 5

1 Answers1

3

Yiur first attempt was correct, but you need to have nuitka on your path. Enter your os and we can help with that. Otherwise you would need to specify the fully qualified path (the path to nuitka along with the program name) whe invoking it.

Edit: didn't see you say windows first thing in the post.

See this question regarding windows paths

Community
  • 1
  • 1
iLoveTux
  • 3,090
  • 18
  • 30