I wrote a program in python, and was trying to compile it into a .exe file using pyinstaller
. It gets converted successfully, and I can run the exe file on my device. However, but during compilation, I get many 'lib not found' warnings.
They are as follows:
165185 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\io\_pywrap_file_io.pyd
165210 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_op_def_util.pyd
165293 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_api_dispatcher.pyd
165329 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_device_lib.pyd
165363 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_tf_session.pyd
165389 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_debug_events_writer.pyd
165603 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\saved_model\experimental\pywrap_libexport.pyd
165627 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_errors_test_helper.pyd
165674 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\profiler\internal\_pywrap_profiler.pyd
165699 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_item.pyd
165727 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_checkpoint_reader.pyd
165772 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_nest.pyd
165832 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_tfprof.pyd
165856 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_utils.pyd
165881 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_kernel_registry.pyd
165992 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_stat_summarizer.pyd
166012 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\io\_pywrap_record_io.pyd
166038 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\client\_pywrap_events_writer.pyd
166066 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_dtypes.pyd
166085 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_cluster.pyd
166113 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\grappler\_pywrap_tf_optimizer.pyd
166156 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_api_info.pyd
166183 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_op_def_registry.pyd
166211 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_op_gen.pyd
166256 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\profiler\internal\_pywrap_traceme.pyd
166278 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_tensor_float_32_execution.pyd
166293 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\data\experimental\service\_pywrap_server_lib.pyd
166319 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\util\_pywrap_transform_graph.pyd
166448 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\_pywrap_python_api_parameter_converter.pyd
166470 WARNING: lib not found: torch_python.dll dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\torch\_C.cp38-win_amd64.pyd
166546 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\core\_pywrap_py_func.pyd
166557 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\lib\core\_pywrap_bfloat16.pyd
166568 WARNING: lib not found: _pywrap_tensorflow_internal.pyd dependency of c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\platform\_pywrap_stacktrace_handler.pyd
All of them are related to tensorflow
, except one which is torch_python.dll. The folder named tensorflow in site-packages exists, but the files are not there. Apart from this it shows warning for hidden imports for tensorflow again.
Following are the hidden import warnings:
130756 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.initializers" not found!
130898 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.layers.experimental.preprocessing" not found!
131048 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.layers" not found!
131050 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.v1" not found!
131057 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.backend" not found!
131057 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.datasets.reuters" not found!
131144 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.regularizers" not found!
131145 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.estimator.experimental" not found!
131146 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.premade" not found!
131147 WARNING: Hidden import "tensorflow._api.v2.compat.v2.estimator" not found!
131407 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.preprocessing.image" not found!
131456 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.datasets" not found!
131456 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.__internal__.backend" not found!
131458 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.__internal__" not found!
131458 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.losses" not found!
131464 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.applications.inception_v3" not found!
131465 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.callbacks" not found!
131468 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.datasets.cifar100" not found!
131621 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.nasnet" not found!
131622 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.activations" not found!
131631 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.estimator" not found!
131631 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.optimizers" not found!
131633 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.v2" not found!
131635 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.applications.mobilenet_v2" not found!
131644 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.datasets.reuters" not found!
131646 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.optimizers" not found!
131647 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.__internal__.legacy" not found!
131829 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.callbacks.experimental" not found!
131830 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.applications" not found!
131832 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.xception" not found!
131833 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.utils" not found!
131905 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.datasets.cifar100" not found!
131906 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.experimental" not found!
131912 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.layers.experimental.preprocessing" not found!
131962 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.inception_resnet_v2" not found!
132010 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.optimizers.schedules" not found!
132101 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.premade" not found!
132105 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.__internal__.legacy.layers.experimental" not found!
132106 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.xception" not found!
132117 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.__internal__.legacy.layers.experimental" not found!
132118 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.__internal__" not found!
132126 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.vgg19" not found!
132214 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.mixed_precision" not found!
132215 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.inception_v3" not found!
132227 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.applications.vgg19" not found!
132280 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.premade" not found!
132281 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.applications.mobilenet_v2" not found!
132291 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.preprocessing.image" not found!
132291 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.inception_resnet_v2" not found!
132292 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.applications.imagenet_utils" not found!
132295 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.datasets.imdb" not found!
132395 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.datasets" not found!
132396 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.__internal__.utils" not found!
132398 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.utils" not found!
132404 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.datasets.boston_housing" not found!
132405 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.layers.experimental.preprocessing" not found!
132406 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.premade" not found!
132408 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.estimator.tpu.experimental" not found!
132583 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.callbacks" not found!
132584 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.layers" not found!
132592 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.mixed_precision" not found!
132637 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.applications.resnet" not found!
132643 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.datasets.cifar100" not found!
132643 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.datasets.imdb" not found!
132646 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v1.keras.datasets.imdb" not found!
132647 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.estimator.tpu" not found!
132648 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.wrappers" not found!
132649 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.estimator" not found!
132650 WARNING: Hidden import "tensorflow._api.v2.compat.v2.v2" not found!
132661 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.losses" not found!
132672 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.applications.imagenet_utils" not found!
132672 WARNING: Hidden import "tensorflow._api.v2.compat.v2.compat.v2.keras.wrappers.scikit_learn" not found!
132674 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.applications.imagenet_utils" not found!
132683 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v1.keras.preprocessing.text" not found!
132684 WARNING: Hidden import "tensorflow._api.v2.compat.v2.keras.losses" not found!
132777 WARNING: Hidden import "tensorflow._api.v2.compat.v1.keras.regularizers" not found!
132778 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.vgg19" not found!
132780 WARNING: Hidden import "tensorflow._api.v2.compat.v1.compat.v2.keras.applications.resnet_v2" not found!
Is there any way I can download them and paste them into the folder or if it can auto-download in any way? Will this create an issue when running the program on another device?
CodePudding user response:
Yes, Add these two arguments in your pyinstaller command:
--add-data="c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\tensorflow;."
--add-data="c:\users\chinu\appdata\local\programs\python\python38\lib\site-packages\torch\_C.cp38-win_amd64.pyd;."
CodePudding user response:
I can run the exe file on my device
It means that you can run it on other devices without any issues
Is there anyway I can download them and paste them in the folder or if it can auto download in any way?
pip install tensorflow
must work.
Update: Try building tensorflow manually. You can find full guides here. This will work for sure.