Comments (12)
I also tried to repeat this on another PC with a similar system + tried to use the dev version - it gives this error everywhere
from nuitka.
I suspect this is tensorflow / protobuf in a newer version, I am trying to reproduce it now, but generally tensorflow was working previously, so this is a regression. Also I wonder what tensorflow/core/protobuf/replay_log.proto
is, maybe it's a new data file, and that is causing this.
from nuitka.
Good afternoon, thanks for the reply!
Could you tell me the versions of python/nuitka/tensorflow on which everything worked?
The strangest thing is that I cannot find this file on the PC, I tried searching through
sudo find / -name replay_log.proto
from nuitka.
I don't keep track of it like that. I saw the proto files in grep when using --list-package-data=tensorflow
, I didn't check the precise file, but it seems there were really many of these.
from nuitka.
also, i can compile without some dependencies
python -m nuitka --standalone --nofollow-import-to=tensorflow --nofollow-import-to=keras --nofollow-import-to=google main.py
but if i run ./main.bin
it's show me error ModuleNotFoundError: No module named 'tensorflow'
How can I make the binary have a dependency on tensorflow from my environment?
from nuitka.
You cannot add to standalone @mookor for that you would have to use accelerated mode, which has of course portability (to other systems) problems.
from nuitka.
@kayhayen I think nuitka may add a new compile option to skip compile 3rd None Pure-Python packages automatically. For the libs such as tensorflow, the lib owner have compiled them to pyd/so files. Nuitka should focus on the Pure-Python packages.
from nuitka.
In the plugins, you can decide the compilation mode and, if at all, on a per-module basis; however, if you put "bytecode" there, it will not necessarily work at all. One typical upcoming example will be that the source code will be needed for JITs or whatever, and I don't really want to find out myself why then things don't work and support that. By the time the bytecode is created in a good way and is re-used cached, then it can also just generate the C code and be good too, since that is not really the problem usually.
The real solution is improved scalability of Nuitka, which will be my focus in the summer. With a 10x improvement in Python compile time, and maybe caching of its result one day, we will be good. Also with 3.13, we might try and compile with the no-GIL variant eventually in parallel or we use multiprocessing, but that will require caching to work, because it's going to be how the result is communicated back.
Anyway, it's a nice idea, and if you can write a plugin that makes it work for you, and you feel that is time spent well, go on. For me, it's a diversion from my main goals.
from nuitka.
So, I reproduced it and found that the string in question lives in MiniTensorflowOpt.dist/tensorflow/python/_pywrap_tensorflow_internal.so
. Of course, the question now is why, if at all, it is loaded twice, this may just misdiagnosis of that code. My googling found only cases of unsupported platforms.
from nuitka.
So, this is probably the issue:
grep: MiniTensorflowOpt.dist/tensorflow/python/_pywrap_tensorflow_internal.so: binary file matches
grep: MiniTensorflowOpt.dist/_pywrap_tensorflow_internal.so: binary file matches
This is because of those:
<included_extension name="_pywrap_tensorflow_internal.so" dest_path="tensorflow/python/_pywrap_tensorflow_internal.so" source_path="~/.local/lib/python3.9/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so" package="tensorflow.python" ignored="no" reason="used extension module" />
<included_dll name="_pywrap_tensorflow_internal.so" dest_path="_pywrap_tensorflow_internal.so" source_path="~/.local/lib/python3.9/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so" package="tensorflow.compiler.mlir.quantization.tensorflow.calibrator" ignored="no" reason="Used by 'tensorflow/compiler/mlir/quantization/tensorflow/calibrator/pywrap_calibration.so'" />
So, it's found as both an extension module and a DLL, which is very strange.
from nuitka.
One thing I noticed and dislike, is this:
libtensorflow_framework.so.2 => /home/hayen/repos/Py2C/MiniTensorflowOpt.dist/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/../../../../../../libtensorflow_framework.so.2 (0x00007f0d950df000)
It seems, that it's carried over from the original PyPI package
libtensorflow_framework.so.2 => /home/hayen/.local/lib/python3.9/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/../../../../../libtensorflow_framework.so.2
Of course, that is very ugly and may, in fact, cause issues if those directories do not all exist, although I think that at least Linux is forgiving there, so that's not our issue.
What happens, though, it seems, is that there is a dependency as a DLL on an extension module.
_pywrap_tensorflow_internal.so => /home/hayen/.local/lib/python3.9/site-packages/tensorflow/compiler/mlir/quantization/tensorflow/calibrator/../../../../../python/_pywrap_tensorflow_internal.so
Nuitka places DLLs near the main binary by default to make it most likely to be found by everything.
from nuitka.
So, I guess the solution is to remove DLLs from detection, which are just extension modules and hope for the best, namely that they are found.
from nuitka.
Related Issues (20)
- undefined symbol: const_str_plain_split HOT 6
- Windows standalone build is unable to find libusb_package HOT 6
- Self compiled uninstalled Windows Python not working with venv, maybe others HOT 6
- Azure speech recognition needs support HOT 4
- Nuitka packaging does not support the normal invocation of the mne.io.read_raw_fif function. HOT 1
- Functions created with `types.FunctionTypes` segfault HOT 7
- Corrupted sys.argv HOT 10
- Error, cannot add data file with 'dash\.\extract-meta.js' path, as 'contains illegal suffix '.' in path part '.'' HOT 3
- Application error when buiid exe uses package selenium_driverless
- There is a problem with packaging dependency libraries HOT 1
- Recommendations of how to compile PEG parser for xonsh project HOT 3
- loguru with --windows-console-mode=attach HOT 29
- TypeVars created during class creation do not carry over to the class's local scope HOT 3
- After the script is packaged, although it can run to the program interface, it cannot use the program normally. error occurred HOT 1
- TypeVar fails to compile when using recursive type annotation HOT 1
- FATAL: Error, 'depends.exe' failed to produce expected output. When using pycharm Terminal to wrap the python programs. HOT 6
- [wasm32-wasi] About function pointer casting in build/static_src HOT 5
- Can Nuitka support pypy? HOT 4
- Question about --onefile, --noinclude-dlls and excluded libs search. HOT 1
- sys.argv is broken in nuitka 2.4 in Windows HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuitka.