Comments (3)
This is my pip list after installation from WHL.
Package Version
----------------- ---------
coloredlogs 15.0.1
filelock 3.15.4
flatbuffers 24.3.25
fsspec 2024.6.1
humanfriendly 10.0
intel-openmp 2021.4.0
Jinja2 3.1.4
MarkupSafe 2.1.5
mkl 2021.4.0
mpmath 1.3.0
networkx 3.3
numpy 2.0.0
onnxruntime 1.19.0
packaging 24.1
pip 24.0
protobuf 5.27.2
pyreadline3 3.4.1
setuptools 70.2.0
sympy 1.13.0
tbb 2021.13.0
torch 2.3.1
typing_extensions 4.12.2
wheel 0.43.0
from onnxruntime.
I had the same problem when running python scripts from the onnxruntime git checkout, because it contains a folder named "onnxruntime" which gets confused with the onnxruntime package.
from onnxruntime.
Thanks for the response. I changed the name of the onnxruntime folder under the git repo, and it won't give me "onnxruntime.capi" error. But now it says "Module onnx is not installed".
According to the error log, "onnx" is called under "torch". For "torch", I manually installed it by "pip install" after installing the WHL file. So for "onnx", do I need to manually install it by "pip install onnx"? Btw "onnx" is not installed after installing the WHL.
Traceback (most recent call last):
File "C:\Users\arda\miniforge3\envs\test-onnx\Lib\site-packages\torch\onnx\_internal\onnx_proto_utils.py", line 219, in _add_onnxscript_fn
import onnx
ModuleNotFoundError: No module named 'onnx'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\arda\zijie\onnxruntime\onnxruntime-python-api.py", line 127, in <module>
main()
^^^^^^
File "C:\Users\arda\zijie\onnxruntime\onnxruntime-python-api.py", line 109, in main
create_model()
File "C:\Users\arda\zijie\onnxruntime\onnxruntime-python-api.py", line 30, in create_model
torch.onnx.export(model(), (sample_x, sample_y), MODEL_FILE, input_names=["x", "y"], output_names=["z"],
File "C:\Users\arda\miniforge3\envs\test-onnx\Lib\site-packages\torch\onnx\utils.py", line 516, in export
_export(
File "C:\Users\arda\miniforge3\envs\test-onnx\Lib\site-packages\torch\onnx\utils.py", line 1686, in _export
proto = onnx_proto_utils._add_onnxscript_fn(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\arda\miniforge3\envs\test-onnx\Lib\site-packages\torch\onnx\_internal\onnx_proto_utils.py", line 221, in _add_onnxscript_fn
raise errors.OnnxExporterError("Module onnx is not installed!") from e
torch.onnx.errors.OnnxExporterError: Module onnx is not installed!
from onnxruntime.
Related Issues (20)
- [Build] Access Violation error on using 'new InferenceSession(filepath)' in 1.18.1
- Why is CoreMLExecution an Objective-C class HOT 1
- Question
- [Bug]: Onnxruntime.CPU memoty leaks
- onnxruntime-directml import interference with sklearn
- ORTModelForSeq2SeqLM.from_pretrained can not use provider=['CUDAExecutionProvider','CPUExecutionProvider'] HOT 4
- Inferencing FP16 model using onnxruntime
- [Build] CUDA_PATH is set but CUDA wasn't able to be loaded (Windows 11, onnxruntime-gpu 1.13.1, CUDA 11.8) HOT 2
- [Build] [WebGPU] Failed to build without "--enable_wasm_threads" HOT 5
- [Build] ERROR: No matching distribution found for onnxruntime HOT 4
- [Feature Request] Implement IEquatable<T> on OrtTensorTypeAndShapeInfo
- [Web] Allow passing Uint8ClampedArray to ort.Tensor()
- [Build] Android build issue on windows HOT 2
- CoreML - Writing CoreML Model on every inference session creation
- [Build] Getting issue with ONNX Runtime library name HOT 2
- 【CUDA does not work】onnxruntime-gpu==1.19.0 HOT 3
- Can anyone successfully use onnx and yolo5?
- The data I output using YOLO5 is incorrect, why is that? Has anyone succeeded?
- Why ONNX Runtime Dlls are not Signed by Microsoft
- Breaks RootNamespace
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 onnxruntime.