Skip to content
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

Import error after install (GPU version) #48

Open
antonio1234567891011 opened this issue May 8, 2019 · 6 comments
Open

Import error after install (GPU version) #48

antonio1234567891011 opened this issue May 8, 2019 · 6 comments

Comments

@antonio1234567891011
Copy link

Hi guys
Hope all is well
the tensorflow plugin is installed and
CUDA and CUDNN installed

LogPluginManager: Mounting plugin TensorFlow
LogPython: Python Scripts search path: ../../../../../../Users/U1/Documents/Unreal Projects/MyProject/Plugins/tensorflow-ue4/Content/Scripts
LogPython: Added TensorFlow Plugin Content/Scripts (C:/Users/U1/Documents/Unreal Projects/MyProject/Plugins/tensorflow-ue4/Content/Scripts) to sys.path
LogPython: upymodule_importer::Resolving upymodule dependencies for tensorflow-ue4
LogPython: upymodule_importer::tensorflow-gpu 1.12.0 installed? True
LogPython: upymodule_importer::2 tensorflow-ue4 upymodule dependencies resolved (if installation in progress, more async output will stream)
LogPython: TensorFlow Plugin upymodule.json parsed

Then when i do :
LogTemp: >>> import tensorflow as tf

This is the message:
File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
LogPython: Error: File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
LogPython: Error: File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
LogPython: Error: File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
mod = imp.load_module('pywrap_tensorflow_internal', fp, pathname, description)
LogPython: Error: File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow_init
.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
LogPython: Error: File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python_init
.py", line 49, in
from tensorflow.python import pywrap_tensorflow
LogPython: Error: File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in
File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\U1\Documents\Unreal Projects\MyProject\Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors

@sanford87
Copy link

I have the same problem. I've tried everything I can think of with no luck. I've got a M2200 GPU which is capable of running tensorflow. I only get this error using the plugin.

@getnamo
Copy link
Owner

getnamo commented Jun 17, 2019

Does the CPU version work?

@getnamo getnamo changed the title tensorflow-ue4 Import error after install (GPU version) Jun 17, 2019
@sanford87
Copy link

Yes, The CPU version works. I can import numpy too without an issue but importing tensorflow throws the errors. I thought it might be a problem with using the python version that came with the plugins. BTW, amazing response time!!! It's pretty incredible what this plugin is capable of.

@sanford87
Copy link

Would it help to post the initial logs from the first boot? It seems like everything installed correctly with 4 PATH warning similar to:
WARNING: The script f2py.exe is installed in 'c:...\plugins\unrealenginepython\binaries\win64\Scripts' which is not on PATH.

I added that directory to PATH just to be safe but it didn't change anything.

@sanford87
Copy link

Wow, Can't believe it took so long to figure this out... tensorflow isn't installed. I found it out after running pip.list()
Solution: Create a new python script in the editor and run:

import upypip as pip
pip.install('tensorflow')

@getnamo
Copy link
Owner

getnamo commented Jun 18, 2019

For both versions (CPU and GPU) it already does that, you just need to wait for the script to complete according to step 8 of https://github.com/getnamo/tensorflow-ue4#installation--setup. Versions installed are determined by https://github.com/getnamo/tensorflow-ue4/blob/master/Content/Scripts/upymodule.json where the gpu version will use tensorflow-gpu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants