Build app for differents platforms

i am trying to get apps including some other files like tensorflow using files .h5 .pkl but i get an error error: [Errno 2] No such file or directory: ‘requirements.txt’

the code :
from setuptools import setup

setup(

name = "Talk to Shama",

options = {

    "build_apps" : {

        "include_patterns" : [

            r"C:\Users\anass\OneDrive\Bureau\ShamaPFE\shamaArabicBot\encoderShamaArabbot.h5",

            r"C:\Users\anass\OneDrive\Bureau\ShamaPFE\shamaArabicBot\decoderShamaArabbot.h5",

            r"C:\Users\anass\OneDrive\Bureau\ShamaPFE\shamaArabicBot\tokns_indexArabbotshama.pkl",

            r'C:\Users\anass\OneDrive\Bureau\ShamaPFE\shamaEnglishBot\encoderShamaEnglish.h5',

            r"C:\Users\anass\OneDrive\Bureau\ShamaPFE\shamaEnglishBot\decoderShamaEnglish.h5",

            r"C:\Users\anass\OneDrive\Bureau\ShamaPFE\shamaEnglishBot\tokns_index_botEnglish.pkl",

            "/c/Users/anass/OneDrive/Bureau/ShamaPFE/face.bam",

            "/c/Users/anass/OneDrive/Bureau/ShamaPFE/face_Blinking.bam",

            "/c/Users/anass/OneDrive/Bureau/ShamaPFE/face_Mouth.bam"

        ],

        "gui_apps" : {

            "Talk to Shama" : "appTest.py"

        },

        "plugins" : [

            "pandagl",

            "p3openal_audio"

        ],

        "platforms" : [

            "manylinux1_x86_64",

            "macosx_10_6_x86_64",

            "win_amd64"

        ],

        "log_append" : False

    }

}

)

Well, do you have a “requirements.txt” file?

no i didn’t create one, is it important ?

I believe so, yes.

This manual page mentions the file in question briefly, and links to more-detailed information.

If you’re just using Panda3D and no external libraries, and if you don’t require a specific version of Panda, then I think that the file can contain nothing more than the line:
panda3d

If you have other libraries to import, however, then things get a little more complicated. The page to which the above manual entry links might help.

i am using a lot of python librairies like tensorflow gTTS and a lot of others. is this file for building the app or for the users ? because i wqnt to generate only app files for the users with no panda or panda dependecies

It’s used by the build-system; your users should never see it, I believe. (Unless you cause it to be added into the distributable, of course.)

As to your others, you might want to look into whether and how they’re to be included in your requirements file; I’m afraid that I don’t have much information on that myself, except perhaps the web-page linked-to by the manual-page given above.

but when it finished building the user doesnt need to have python on his computer ?

The user shouldn’t require Python, no.

However, I’ll confess that I’m not sure that I’ve tested that, so perhaps wait and see whether anyone contradicts me on the matter!

i will test this after when it’s done. does the app after building it has folders that can use my .bam and other files than i specified in the include_patterns.
is the req file should looks like that :

panda3d
SpeechRecognition
import os
tensorflow
numpy
pickle
warnings
logging
simplepbr
threading
gTTS
playsound

Only librairies that can be installed by pip

Fair enough!

It should have, if you’ve specified them all.

I honestly don’t know–as I said, I don’t have much information on that myself.

i cannot hide that personal files from the user ?

You could pack them into a multifile. (See the manual for more information on this.)

Note, however, that it’s unlikely that any known technological strategy of hiding your data will be absolutely effective if the data ends up on the user’s machine; chances are that there will be some way of extracting that data if the someone is so inclined.

Still, you can make sure that it’s not in obvious sight–and multifiles can potentially help with that.

i do not know why this error while building the app :

ERROR: Could not find a version that satisfies the requirement wrapt~=1.12.1 (from tensorflow) (from versions: none)
ERROR: No matching distribution found for wrapt~=1.12.1

do i need to specify one version ? because i didn’t specified version in the req file

I’m not greatly confident in this, but it looks like it’s “tensorflow” that’s specifying that “wrapt” version “~=1.12.1” be used.

It might be worth searching online for other users who might have had such a problem when using tensorflow.

i fixed this but when i try to run the builded qpp from build folder it doesn’t run like nothing happn when i click to run it

Have you set up a log-file, and if so, have you checked that file? (See here for more information.)

Otherwise, you could try running your program from the command-line/cmd, and see whether any errors are printed there.

i will try this now: i didnt set the log file. But i get a lot of warnings while the building is running :

i did run it now but i didnt get nothing
cmdrun

What is “start”? I’m not familiar with that command.

What happens if you just run “TalktoShama.exe” from the command-line, with the “start”?

start just for running the app file. when i did it nothing happend it just gives another propmt