#🔒 Python to .exe

87 messages · Page 1 of 1 (latest)

kindred sable
#

Hey guys I can run everything which i've made just fine with a python xx.py command but when I change it to .exe using either pyinstaller or nuitka it keeps giving me an error and it says that some of the dependencies aren't installed on my pc (after it builds i install and it crashes). but they are since it works on python clearly. every time i tap the .exe it crashes in 2 seconds

velvet saffronBOT
#

@kindred sable

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

kindred sable
#

I'm planning on selling the tool I created so I need to keep it more closed src even after buying so it doesnt get leaked, exe doenst make it too hard but it makes it harder to leak

#

If there are any methods for me to keep it as a closed src so it doesnt get leaked and still have it functional it'd be much appreciated

#

before this I was able to launch it on pyinstaller BUT it wouldnt interact with the libraries i wanted it to import related to ethereum, so even when a correct data was inputted it was displayed as wrong or (BAD) in this case

naive cape
#

Nuitka is pretty hard to decompile

#

Also, what dependencies are missing? What command did you use with nuitka to compile? Can you show your imports?

kindred sable
#

sure

#

import random
import asyncio
import nltk
from eth_account import Account
from eth_utils.exceptions import ValidationError
from colorama import Fore, Style, init
import os
import time
import tkinter as tk
from tkinter import filedialog
import os
import json as jsond
import time
import binascii
from uuid import uuid4
import platform
import subprocess
import sys
import time
import platform
import os
import hashlib
from datetime import datetime
import keyboard

velvet saffronBOT
#

Hey @kindred sable!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
naive cape
#

And what dependencies are missing? Also what command did you use?

kindred sable
#

and another one too which had the dependencies in the line (that one didnt work and crashed)

kindred sable
naive cape
#

You need to enable pluging tk-inter

kindred sable
#

nltk
eth_account
eth_utils
colorama
keyboard
win32security
requests
Crypto.Cipher
Crypto.Hash
Crypto.Util.Padding
Crypto

naive cape
#
--enable-plugin=tk-inter

If i remember correctly

kindred sable
#

where do i put that

#

oh yea

#

nvm i got it

naive cape
#

With the command to compile

kindred sable
#

python -m nuitka --enable-plugin=tk-inter --standalone seed_stealer.spec

#

like this?

naive cape
#

Also maybe add the follow imports argument

kindred sable
#

ok yh

naive cape
#
--follow-imports
#

Like so

#

Nuitka can be very Very in depth

kindred sable
#

python -m nuitka --enable-plugin=tk-inter --follow-imports --standalone seed_stealer.spec

naive cape
#

I'd also go with onefile option for easier distribution instead of standalone

#

wait your file is called seed_stealer I can't help with that

#

Bruh

velvet saffronBOT
#

3. Respect staff members and listen to their instructions.

kindred sable
#

lmaooo

naive cape
#

Okay I guess

#

Why do you point to spec insrasd of the main file?

#

Instead

kindred sable
naive cape
#

That's how I usually do it, yes

kindred sable
#

alr got it

naive cape
#

Btw I'd recommend to read the nuitka manual, it's very very in depth

#

And let you customize your end product to a very fined tuned executable

kindred sable
#

ill let you know if it goes well

naive cape
#

Okay dokey

inland girder
kindred sable
#

mb mb 😭

naive cape
#

nuitka be complex

kindred sable
#

yea it still crashes on launch

#

imma go to sleep now but if you have any info you can lmk here

#

ty

inland girder
inland girder
naive cape
kindred sable
#

But I assure you nothings wrong with the src code

#

since it runs on python properly

inland girder
naive cape
#

What's the error then? Wrap the whole thing in try except and add input() at the end to pause before existing

naive cape
kindred sable
inland girder
#

sometimes plugins like tkinter are needed

naive cape
kindred sable
inland girder
#

none.

kindred sable
inland girder
#

should be enough, yes.

kindred sable
#

also my code interacts with a library btw and like when I attempted to make it Exe with py installer it made it functional BUT it didn’t display stats from the library

#

But it does on python

#

and it works properly but when I make it an Exe it’s difficult

#

Idk why

naive cape
inland girder
#

without the source, all i can do is guess.

inland girder
inland girder
#

ah, then yeah they do

kindred sable
#

I’ll update you guys tommorow once I’m awake lol

naive cape
#

gl I guess

#

Having a maintainer help you is somthing you don't wanna miss though

#

It'll save you headech

velvet saffronBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.