Build app for differents platforms

what about the log file is that the right way to save it ?

Hmm… I seem to use Panda’s format for directories. Now, I am using Ubuntu Linux, which uses the same format, but it might be worth trying.

See the link below for an example:
(About three-quarters of the way down the page.)

this is what i followed. i used panda format for .bam files but with other files i used the normal windows paths. for the log file i do have to specify the folder that i want to put the log file in ?

It might be worth trying the Panda format for your log-files, too.

I’m not sure, to be honest.

Fair warning: it’s late here, and I’m about to close up for the evening. So, for now I’ll leave you to any other community-members who might be or come to be around.

this is the log file :

Traceback (most recent call last):
File “importlib._bootstrap_external”, line 1353, in _path_importer_cache
KeyError: ‘C:\Users\anass\OneDrive\Bureau\ShamaPFE\build\win_amd64’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “main”, line 7, in
File “importlib._bootstrap”, line 1007, in _find_and_load
File “importlib._bootstrap”, line 986, in _find_and_load_unlocked
File “importlib._bootstrap”, line 680, in _load_unlocked
File “importlib._bootstrap”, line 838, in exec_module
File “speech_recognition”, line 8, in
File “importlib._bootstrap”, line 1007, in _find_and_load
File “importlib._bootstrap”, line 986, in _find_and_load_unlocked
File “importlib._bootstrap”, line 680, in _load_unlocked
File “importlib._bootstrap”, line 838, in exec_module
File “subprocess”, line 58, in
File “importlib._bootstrap”, line 1007, in _find_and_load
File “importlib._bootstrap”, line 982, in _find_and_load_unlocked
File “importlib._bootstrap”, line 925, in _find_spec
File “importlib._bootstrap_external”, line 1414, in find_spec
File “importlib._bootstrap_external”, line 1383, in _get_spec
File “importlib._bootstrap_external”, line 1355, in _path_importer_cache
File “importlib._bootstrap_external”, line 1331, in _path_hooks
File “importlib._bootstrap_external”, line 1601, in path_hook_for_FileFinder
File “importlib._bootstrap_external”, line 1476, in init
File “importlib._bootstrap_external”, line 171, in _path_isabs
AttributeError: module ‘nt’ has no attribute ‘_path_splitroot’

1 Like

after downgrade to python 3.8.9 i got this errors :
Traceback (most recent call last):
File “main”, line 10, in
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 961, in _find_and_load_unlocked
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 961, in _find_and_load_unlocked
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow”, line 41, in
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 961, in _find_and_load_unlocked
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python”, line 46, in
File “importlib._bootstrap”, line 1042, in _handle_fromlist
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python.data”, line 25, in
File “importlib._bootstrap”, line 1042, in _handle_fromlist
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python.data.experimental”, line 99, in
File “importlib._bootstrap”, line 1042, in _handle_fromlist
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python.data.experimental.service”, line 140, in
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python.data.experimental.ops.data_service_ops”, line 29, in
File “importlib._bootstrap”, line 1042, in _handle_fromlist
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python.data.ops.dataset_ops”, line 73, in
File “importlib._bootstrap”, line 1042, in _handle_fromlist
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python.training.tracking.tracking”, line 31, in
File “importlib._bootstrap”, line 1042, in _handle_fromlist
File “importlib._bootstrap”, line 219, in _call_with_frames_removed
File “importlib._bootstrap”, line 991, in _find_and_load
File “importlib._bootstrap”, line 975, in _find_and_load_unlocked
File “importlib._bootstrap”, line 671, in _load_unlocked
File “importlib._bootstrap”, line 827, in exec_module
File “tensorflow.python.training.tracking.data_structures”, line 37, in
ImportError: cannot import name ‘layer_utils’ from ‘tensorflow.python.training.tracking’ (C:\Users\anass\OneDrive\Bureau\ShamaPFE\build\win_amd64\TalktoShama.exe)

this is the req file :

panda3d
SpeechRecognition
tensorflow
numpy
panda3d-simplepbr
thread6
gTTS
playsound
C:\Users\anass\OneDrive\Bureau\ShamaPFE\PyAudio-0.2.11-cp38-cp38-win_amd64.whl

Why did you downgrade to Python 2? (I’m presuming that it was from a version of Python3 that you downgraded.) That seems like it could introduce problems, especially if one or more of your libraries are expecting Python3.

As to your issue, seeing that requirements file now I suspect that the problem lies with that last line. However, I don’t now enough about the usage of requirements file to be confident in that, or to suggest a solution. (Aside, perhaps, from trying Panda-style directory-formatting.)

Oh sorry i mean to python 3.8.9. The last file is just to install pyaudio from it when the app building its install it. what about the plugins do i need to add other plugins ? whqt is plugings for ?

Still, I’m not convinced that the formatting used there is correct.

Not knowing your program, I don’t know what plugins it might require.

See this page for more information on that, and on what plugins are available, I believe.

do i need all this recommended libraries mentioned here : Third-party dependencies and license info — Panda3D Manual

I doubt it. I’d suggest looking through that listing, reading up on what each library there provides, and considering whether those things are important to your specific project.

what about you ? do you use only python library you dont use others ?

I genuinely don’t remember what I have installed at this point. ^^;

It looks like the tensorflow package was not properly bundled by build_apps. You can try adding the missing module to the include_modules list. Some “hidden” imports are not detected by build_apps and need to be specified manually. I usually look at PyInstaller hook files to figure out what might be missing (build_apps works very similarly to PyInstaller). Unfortunately, I don’t see such a file for tensorflow.

1 Like

But how can i specify tensorflow packages in the include modules at the setup file? pyinstaller deoesnt have such problem ?

from the log file, it looks like I’m having the same issue with a relatively straightforward windows build (no tensorflow):
AttributeError: module ‘nt’ has no attribute ‘_path_splitroot’ at runtime:
build time: warning: build_apps: could not find dependency api-ms-win-core-path-l1-1-0.dll (referenced by python39.dll)

requirements.txt

panda3d
panda3d-simplepbr
panda3d-gltf
more-itertools

log output:

Traceback (most recent call last):
  File "__main__", line 2, in <module>
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 986, in _find_and_load_unlocked
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap", line 838, in exec_module
  File "scene.area_light", line 6, in <module>
  File "importlib._bootstrap", line 1007, in _find_and_load
  File "importlib._bootstrap", line 986, in _find_and_load_unlocked
  File "importlib._bootstrap", line 680, in _load_unlocked
  File "importlib._bootstrap", line 838, in exec_module
  File "panda3d.core", line 1, in <module>
  File "imp", line 336, in load_dynamic
  File "importlib._bootstrap_external", line 1157, in __init__
  File "importlib._bootstrap_external", line 171, in _path_isabs
AttributeError: module 'nt' has no attribute '_path_splitroot'

build log


$ py setup.py build_apps
running build_apps
Building platforms: win_amd64
Gathering wheels for platform: win_amd64
Looking in indexes: https://pypi.org/simple, https://archive.panda3d.org/simple/opt, https://archive.panda3d.org/thirdparty
Collecting panda3d
  File was already downloaded c:\pandatest\build\__whl_cache__\win_amd64_cp39\panda3d-1.10.9+opt-cp39-cp39-win_amd64.whl
Collecting panda3d-simplepbr
  File was already downloaded c:\pandatest\build\__whl_cache__\win_amd64_cp39\panda3d_simplepbr-0.8-py3-none-any.whl
Collecting panda3d-gltf
  File was already downloaded c:\pandatest\build\__whl_cache__\win_amd64_cp39\panda3d_gltf-0.13-py3-none-any.whl
Collecting more-itertools
  File was already downloaded c:\pandatest\build\__whl_cache__\win_amd64_cp39\more_itertools-8.8.0-py3-none-any.whl
Collecting tk
  File was already downloaded c:\pandatest\build\__whl_cache__\win_amd64_cp39\tk-0.1.0-py3-none-any.whl
Successfully downloaded panda3d panda3d-simplepbr panda3d-gltf more-itertools tk
Building runtime for platform: win_amd64
There are some missing modules: ['__builtin__', '_posixshmem', '_posixsubprocess', '_scproxy', 'dummy.Process', 'grp', 'multiprocessing.AuthenticationError', 'multiprocessing.BufferTooShort', 'multiprocessing.TimeoutError', 'multiprocessing.get_context', 'multiprocessing.get_start_method', 'multiprocessing.set_start_method', 'resource', 'zipimport']
warning: build_apps: could not find dependency api-ms-win-core-path-l1-1-0.dll (referenced by python39.dll)

warning: build_apps: _testinternalcapi.pyd was not found in any downloaded wheel, is a dependency missing from requirements.txt?

warning: build_apps: _testcapi.pyd was not found in any downloaded wheel, is a dependency missing from requirements.txt?

Copying Tcl files
Copying game files for platform: win_amd64

What version of Python are you using?

Based on a recent thread, starting specifically with this post, I gather that a recent version of Python introduced an issue which can produce this error.

The advice in that thread was to downgrade to Python 3.8, and the user who had the issue reported success on downgrading to Python 3.7, I believe.

1 Like

i think you need to search that dll file in python folder and copy it in the dest folder

after trying 3.8 and 3.8.10 (with varying new failures, possibly relating to my use of 3.9 features?) I tried an 3.9.2 and, despite getting the dll warning at build-time, am up and running. Thank you @Thaumaturge

1 Like