Git Product home page Git Product logo

Comments (3)

lzivan avatar lzivan commented on August 18, 2024

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.

mgehre-amd avatar mgehre-amd commented on August 18, 2024

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.

lzivan avatar lzivan commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.