New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to packaging tensorflow.estimator #4697
Comments
PyInstaller 3.4 is no longer supported. Please let us know if the issue persists in 3.6 or the development version. |
I just retested with pyinstaller3.6, and the problem is the same as with pyinstaller3.4 @Legorooj |
Can you link to the tensorflow.estimator docs? |
link can be referred to https://www.tensorflow.org/api_docs/python/tf/estimator/ModeKeys import tensorflow as tf There is a new error if you use tensorflow directly without importing estimator error message: |
Hidden import ERROR 166951 INFO: Analyzing hidden import 'tensorflow.estimator.ModeKeys.TRAIN' |
@CzsGit interesting. Which PyInstaller command raised that error? And can you upload the |
code import tensorflow as tf spec file -- mode: python ; coding: utf-8 --block_cipher = None a = Analysis(['test.py'], What else need to be added to the spec file? |
Any Suggestions? |
@CzsGit the file should work. I'll get back in a day or two when I can replicate the issue. |
I would do 2 things: The example throws a different error for me, the infamous #4406 one. I'm on Windows 7, Python 3.7.6 x64, and using Anaconda 4.8.2... |
@hdf really? Hmm. As I said, I'll get back in a day or two - I've a PR I need to finish first. |
Looking forward to your reply |
I tried your method and the result is the same as before |
I also tested with main.py as the code you mentioned above. |
I tried this method, but it was the same error from PyInstaller.utils.hooks import collect_all
def hook(hook_api):
packages = [
'tensorflow',
'tensorflow_estimator'
]
for package in packages:
datas, binaries, hiddenimports = collect_all(package)
hook_api.add_datas(datas)
hook_api.add_binaries(binaries)
hook_api.add_imports(*hiddenimports) test.py import tensorflow as tf
t=tf.estimator.ModeKeys.TRAIN
print(t) Both versions of pyinstaller 3.4 3.5 3.6 have been tried, and tensorflow has tried both versions of 1.9 1.13 |
error logTraceback (most recent call last): |
Use tensorflow 2.1. that's what I tested with. Also add |
Can you test it with version 1.13.1 or 1.9 of tensorflow?Because I can only use this version in my project now。now I still can't work with this method |
@CzsGit I don't have the time. The linked SO question/answer should provide you with all you need, when combined with the docs. |
ImportError: No module named tensorflow.estimator
mesh-tensorflow 0.0.5
tensorboard 1.13.1
tensorflow 1.13.1
tensorflow-estimator 1.13.0
tensorflow-gpu 1.13.1
tensorflow-probability 0.6.0
test code
import tensorflow.estimator
print('success')
PS:
Adding tensorflow.estimator to hiddenimports has no effect.
The source code executes normally, but an error is reported when run packaged.
Thanks
The text was updated successfully, but these errors were encountered: