Open GiorgosBetsos opened 2 years ago
You can try install using pip's legacy dependency resolver
pip3 install --use-deprecated=legacy-resolver onnxsim
As there are no aarch64/arm64 wheels, pip will attempt to build the wheel. For me it fails during the build.
Same issue.
Same issue.
I think the module requires at least Python 3.7, whereas the version of Jetson with any version of JetPack up to 4.6 is 3.6. So it won't compile.
@GiorgosBetsos No, I'm using JetPack 5.0 with Python 3.8.
Just as mentioned above, run pip3 install --use-deprecated=legacy-resolver onnxsim
will attempt to build the wheel, but failed, seems CMake 3.22 or higher is required. I gave up this for the time being.
@paleomoon install cmake using pip to solve that
same issue, Can not install the latest version
The same issue for me. I have tried the solution provided by https://github.com/daquexian/onnx-simplifier/issues/214#issuecomment-1203845966 and https://github.com/daquexian/onnx-simplifier/issues/214#issuecomment-1206374649. Unfortunately, those solutions did not work for me.
In my opinion, metadata has 'unknown'
are shown in the output multiple times since the version cannot be resolved.
I checked file setup.py
and version is resolved with the following snippet
https://github.com/daquexian/onnx-simplifier/blob/ed25484364c72348b2686b442e847a05806dcc80/setup.py#L41-L47
As can be seen, version is unknown
if tags information cannot be retrieve with git but I'm not sure why this issue does not happen on x86 architecture. Therefore, the solution is very simple. Clone the repository and build from the source code.
The following is the script to build wheel and install the package. I successfully built docker image run on Jetson NX.
FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 AS pybase
# upgrade pip packages
RUN pip3 install --upgrade pip setuptools wheel
# build onnx-simplifier
FROM pybase AS onnxsim
RUN cd / && \
git clone https://github.com/daquexian/onnx-simplifier.git -b v0.4.9 --depth 1 && \
cd onnx-simplifier && \
sed -i 's/git@github.com:/https:\/\/github.com\//g' .gitmodules && \
git submodule update --init --recursive -- third_party/onnx-optimizer && \
git submodule update --init -- third_party/onnxruntime third_party/pybind11 && \
python3 setup.py bdist_wheel && \
find . -name *.whl -exec pip3 install {} \; && \
cd .. && \
rm -rf onnx-simplifier
The same issue for me. I have tried the solution provided by #214 (comment) and #214 (comment). Unfortunately, those solutions did not work for me.
In my opinion,
metadata has 'unknown'
are shown in the output multiple times since the version cannot be resolved.I checked file
setup.py
and version is resolved with the following snippetAs can be seen, version is
unknown
if tags information cannot be retrieve with git but I'm not sure why this issue does not happen on x86 architecture. Therefore, the solution is very simple. Clone the repository and build from the source code.The following is the script to build wheel and install the package. I successfully built docker image run on Jetson NX.
FROM nvcr.io/nvidia/l4t-pytorch:r35.1.0-pth1.13-py3 AS pybase # upgrade pip packages RUN pip3 install --upgrade pip setuptools wheel # build onnx-simplifier FROM pybase AS onnxsim RUN cd / && \ git clone https://github.com/daquexian/onnx-simplifier.git -b v0.4.9 --depth 1 && \ cd onnx-simplifier && \ sed -i 's/git@github.com:/https:\/\/github.com\//g' .gitmodules && \ git submodule update --init --recursive -- third_party/onnx-optimizer && \ git submodule update --init -- third_party/onnxruntime third_party/pybind11 && \ python3 setup.py bdist_wheel && \ find . -name *.whl -exec pip3 install {} \; && \ cd .. && \ rm -rf onnx-simplifier
Thanks to @CNOCycle , the script used to work for me. And today I found out that the bug has been fixed in 0.4.11 with the following snippets.
But I don’t know why, PyPi doesn‘t have v0.4.11 and v0.4.12, pip3 install onnxsim==0.4.13
works for me.
Describe the bug Steps to reproduce on a Jetson Xavier AGX device:
I have created a new conda env on my Jetson Xavier AGX custom board:
$ conda create -n yolov5 python=3.8
I activated the env and installed onnx using conda:
Then I tried to install onnx-simplifier:
$ pip3 install -U pip && pip3 install onnxsim
Installation fails. I get following output: