Comments (6)
Hi, @agence-gvam
I'm really sorry to hear that you spent whole day to solve Tensorflow.js installation, as I see you're using Python version 3.12.2
which does not support currently with Tensorflow.js as far I know so if you did not try Python version apart from 3.12.2
then please give try with one of the Python version from 3.6, 3.7, 3.8, 3.9, 3.10, 3.11
and it should work
I tried in Google Colab notebook and it's working as expected for your reference I have added gist-file I know Google colab uses Linux OS
and it's using Python 3.10.12
version and I'm able to install latest tensorflowjs
version which is 4.17.0
I would request you to please give it try with one of the Python version from 3.6, 3.7, 3.8, 3.9, 3.10, 3.11
and it should work. if issue still persists please help us with error log to investigate this issue further from our end.
Thank you for your cooperation and patience.
from tfjs.
Hi, @garywillcodeit
To confirm, were you able to successfully install tensorflow-decision-forests
along with tensorflowjs
on your MacOS
system by using different Python versions ? If the installation was successful and able to run your code without any errors , please feel free to close this issue.
If you're still encountering problems, please provide us with a new error log and your code snippet after attempting the instructions and workaround. This will help us investigate the issue further on our end.
Thank you for your cooperation and patience in resolving this matter.
from tfjs.
Hi, @garywillcodeit
I haven't got any confirmation from your end but I tried to install latest version of tensorflow-decision-forests
with latest version tensorflowjs
and it's working as expected in Google colab with Python version 3.10.12
and it should work in MacOS
also but your issue still persists please feel free to post your comment with new error log so I'll go ahead and re-open this issue again for further assistance, At the moment I'm closing this issue.
Thank you for your cooperation and patience.
from tfjs.
Are you satisfied with the resolution of your issue?
Yes
No
from tfjs.
Same issue here, tried the same steps and then went onto v4.17.0, which didn't work, so as suggested, I switched python versions, which lead to this:
System information
OS: Windows 10
TensorFlow.js version: 4.17.0
Python version : 3.11.8
Also tried it on 3.10.11, same error
PS C:\Users\gener\Downloads\projects\ai\catchtwo-ai> tensorflowjs_converter --input_format keras old/model.h5 new/model1
2024-03-31 15:17:05.576100: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.
WARNING:root:Failure to load the inference.so custom c++ tensorflow ops. This error is likely caused the version of TensorFlow and TensorFlow Decision Forests are not compatible. Full error:C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\tensorflow\ops\inference\inference.so not found
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Scripts\tensorflowjs_converter.exe\__main__.py", line 4, in <module>
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflowjs\__init__.py", line 21, in <module>
from tensorflowjs import converters
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflowjs\converters\__init__.py", line 21, in <module>
from tensorflowjs.converters.converter import convert
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflowjs\converters\converter.py", line 37, in <module>
from tensorflowjs.converters import tf_saved_model_conversion_v2
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflowjs\converters\tf_saved_model_conversion_v2.py", line 28, in <module>
import tensorflow_decision_forests
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\__init__.py", line 64, in <module>
from tensorflow_decision_forests import keras
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\keras\__init__.py", line 53, in <module>
from tensorflow_decision_forests.keras import core
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\keras\core.py", line 62, in <module>
from tensorflow_decision_forests.keras import core_inference
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\keras\core_inference.py", line 36, in <module>
from tensorflow_decision_forests.tensorflow.ops.inference import api as tf_op
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\tensorflow\ops\inference\api.py", line 179, in <module>
from tensorflow_decision_forests.tensorflow.ops.inference import op
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\tensorflow\ops\inference\op.py", line 15, in <module>
from tensorflow_decision_forests.tensorflow.ops.inference.op_dynamic import *
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\tensorflow\ops\inference\op_dynamic.py", line 24, in <module>
raise e
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\tensorflow\ops\inference\op_dynamic.py", line 21, in <module>
ops = tf.load_op_library(resource_loader.get_path_to_datafile("inference.so"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow\python\framework\load_library.py", line 54, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tensorflow.python.framework.errors_impl.NotFoundError: C:\Users\gener\AppData\Local\Programs\Python\Python311\Lib\site-packages\tensorflow_decision_forests\tensorflow\ops\inference\inference.so not found
from tfjs.
Hello i am facing this error while installing tesorflow\tfjs-node my python version 3.10.7
npm ERR! code 1
npm ERR! path C:\Users\ASUS\tfjs-project\node_modules@tensorflow\tfjs-node
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c C:\Users\ASUS\AppData\Local\Temp\install-8e204898.cmd
npm ERR! CPU-windows-4.19.0.zip
npm ERR! https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.9.1.zip
npm ERR! node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\ASUS\tfjs-project\node_modules@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" (not found)
npm ERR! node-pre-gyp http GET https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.19.0/CPU-windows-4.19.0.zip
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.19.0/CPU-windows-4.19.0.zip
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/[email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.19.0/CPU-windows-4.19.0.zip
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.7 found at "C:\Users\ASUS\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:363:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:384:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:408:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1093:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\ASUS\tfjs-project\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\Users\ASUS\tfjs-project\node_modules\@tensorflow\tfjs-node\lib\napi-v8" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=8" "--node_napi_label=napi-v8"
npm ERR! gyp ERR! cwd C:\Users\ASUS\tfjs-project\node_modules@tensorflow\tfjs-node
npm ERR! gyp ERR! node -v v16.17.1
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ASUS\tfjs-project\node_modules@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\ASUS\tfjs-project\node_modules@tensorflow\tfjs-node\lib\napi-v8 --napi_version=8 --node_abi_napi=napi --napi_build_version=8 --node_napi_label=napi-v8' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (C:\Users\ASUS\tfjs-project\node_modules@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1093:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045
npm ERR! node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\ASUS\tfjs-project\node_modules\@mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\ASUS\tfjs-project\node_modules@tensorflow\tfjs-node
npm ERR! node-pre-gyp ERR! node -v v16.17.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok
npm ERR! * Downloading libtensorflow
npm ERR!
npm ERR! * Building TensorFlow Node.js bindings
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASUS\AppData\Local\npm-cache_logs\2024-05-16T18_48_06_857Z-debug-0.log
from tfjs.
Related Issues (20)
- Model with softmax output layer not outputing probabilities but just 1 and 0 HOT 4
- Model Face Detection Confidence Score Output or Minimum Confidence Score Threshold
- model.executeAsync fails when loading multiple converted TF-DF models HOT 4
- TensorFlowJS fails reliably on Intel GPU running Windows, otherwise succeeds HOT 1
- Error when a module try to install tensorflow HOT 4
- I can't install @tensorflow/tfjs-node in my project HOT 5
- Finish placeholder features: einsum gradients, conv1d causal padding HOT 3
- Tfjs pose detection not working with newer Android devices (12, 13, 14) HOT 11
- Can you guide on how to load model (model.json and group1-shard1of1.bin files) which are downloaded to Documents Directory in iOS and internal app storage folder in Android ? HOT 3
- npm install @tensorflow/tfjs-node error HOT 5
- Cannot import TFJS-Node HOT 5
- memory leak (core dumped) problem in tfjs-node HOT 3
- Error: Kernel 'Draw' not registered for backend 'custom-webgl2' at Engine.runKernel at Module.draw HOT 5
- Face Detection not defined HOT 4
- GPU setup guide HOT 4
- @tensorflow/tfjs-react-native can't be installed successfully expo 51 HOT 5
- T5 Text-to-Text Transformer
- React Native Tensorflow with own models not working HOT 2
- webgpu gpu-pipeline example crashes tab
- Converting Model Saved by tfjs-react-native to Keras or Saved Model
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 tfjs.