onnxruntime: ModuleNotFoundError: No module named 'packaging' ERROR
Describe the issue
Hi everyone, I’m trying to clone onnxruntime repo and install (in order to later use the run_benchmark.sh script), but facing a really weird issue when I try to install. It errors on a missing package which I do have installed.
I already tried the solutions described here without a success.
Error and Output:
Processing /store/code/gpt2/quant/onnxruntime
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-31p956_z/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-31p956_z/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-31p956_z/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 484, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-31p956_z/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 17, in <module>
ModuleNotFoundError: No module named 'packaging'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Please read To reproduce section to see what I did to have that error.
Expected behavior:
installation complete successfully.
I also attach my installed packages list:
Would really appreciate any help on the topic!
To reproduce
I’m cloning the repo:
git clone https://github.com/microsoft/onnxruntime.git
I try to install:
pip install .
Then errors
And that’s it, here I get the error you can see above in my description…
Urgency
No response
Platform
Linux
OS Version
20.04.4 LTS (Focal Fossa)
ONNX Runtime Installation
Other / Unknown
ONNX Runtime Version or Commit ID
onnxruntime Tag=1.13.1 , Commit ID=#13448
ONNX Runtime API
Python
Architecture
X86
Execution Provider
Other / Unknown
Execution Provider Library Version
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (3 by maintainers)
use:
pip install -v --no-build-isolation -- no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext"I have the same issue when running
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--deprecated_fused_adam" --global-option="--xentropy" --global-option="--fast_multihead_attn" ./from fairseq https://github.com/facebookresearch/fairseq#requirements-and-installation
error:
@belm0 putting
packaginginto pyproject.toml didn’t help. I also tried installing the package with conda and apt-get. Neither worked. I wonder how one can handle this.I think this is a regression of onnxruntime 1.13
The
setup.pynow depends on 3rd party packagepackaging, without declaring the dependency. I believe it should be specified inpyproject.toml: