mmcv icon indicating copy to clipboard operation
mmcv copied to clipboard

Fail to build MMCV from source on Jetson Nano

Open falcon-xu opened this issue 2 years ago • 9 comments

Prerequisite

  • [X] I have searched Issues and Discussions but cannot get the expected help.
  • [X] The bug has not been fixed in the latest version(https://github.com/open-mmlab/mmcv).

Environment

JetPack: 4.6.1
Python: 3.6.9
CUDA: 10.2
torch: 1.10.0
torchvision: 0.11.1

Reproduces the problem - code sample

No python code

Reproduces the problem - command or script

Hello, I'm failed to build MMCV from source on Jetson Nano when following the Build for Jetson.

$ sudo apt-get install -y libssl-dev
$ git clone --branch 2.x https://github.com/open-mmlab/mmcv.git
$ cd mmcv
$ MMCV_WITH_OPS=1 pip install -e .

Reproduces the problem - error message

The error message is:

Obtaining file:///home/xgy/dependencies/mmcv
  Preparing metadata (setup.py) ... done
Collecting addict
  Using cached addict-2.4.0-py3-none-any.whl (3.8 kB)
Collecting mmengine>=0.2.0
  Using cached mmengine-0.4.0-py3-none-any.whl (317 kB)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from mmcv==2.0.0) (1.13.3)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Requirement already satisfied: Pillow in /home/xgy/.local/lib/python3.6/site-packages (from mmcv==2.0.0) (8.4.0)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from mmcv==2.0.0) (3.12)
Collecting yapf
  Using cached yapf-0.33.0-py2.py3-none-any.whl (200 kB)
ERROR: Package 'mmcv' requires a different Python: 3.6.9 not in '>=3.7'

Additional information

The maximal supported edition for Python in Jetson Nano is 3.6. Are there any solutions to install MMCV in Python3.6 ? Thanks very much !

falcon-xu avatar Jun 12 '23 12:06 falcon-xu

同求!

qilijin avatar Jun 13 '23 04:06 qilijin

Hi, I am facing the same issue, is there any fix for this?

PolarCub2 avatar Jul 11 '23 09:07 PolarCub2

Hi, @qilijin @PolarCub2, you can try the solution to install mmcv in Python 3.6.

falcon-xu avatar Jul 11 '23 13:07 falcon-xu

@lostsword. Thank you for the tip, it worked. Did you manage to successfully deploy on the Jetson Nano? I ran into some difficulties with the Model Converter, specifically "pip install -v -e ." where the recommended version of onnx==1.10.0 seemed to cause some conflict such as Collecting onnx>=1.13.0? and various other "Link requires a different Python (3.6.15 not in: '>=3.7') warnings". Was wondering if the other steps went smoothly for you.

PolarCub2 avatar Jul 12 '23 09:07 PolarCub2

Me too

cly2625 avatar Jul 18 '23 09:07 cly2625

Hi, thought I would update, I successfully got it working on Jetson. This was done by flashing the following image https://github.com/Qengineering/Jetson-Nano-Ubuntu-20-image and working with Python 3.8.10.

I installed these versions: mmcv-full==1.7.1 mmdet==2.28.2 mmengine==0.8.2 pycocotools==2.0.6 tensorrt==8.0.1.6 (wheel provided in the above link as well) torch==1.12.0a0+git67ece03 torchvision==0.13.0a0+da3794e

PolarCub2 avatar Jul 24 '23 08:07 PolarCub2