You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to build opencv with python 3.12 on Jetson Orin Nano due to subprocess exited with error: AttributeError: module 'pkgutil' has no attribute 'ImpImporter'
#497
Open
collinli2353 opened this issue
Apr 30, 2024
· 2 comments
Set environmental variable export PYTHON_VERSION=3.12
Run ./build.sh --name=my_container build-essential cmake cuda cudnn gstreamer numpy onnx opencv protobuf:cpp pycuda python pytorch tensorrt tensorflow2 torch2trt torchvision
What works
Just running ./build.sh --name=my_container build-essential cmake cuda cudnn gstreamer numpy onnx opencv protobuf:cpp pycuda python pytorch tensorrt tensorflow2 torch2trt torchvision works but it installs for python 3.8
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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.
The command '/bin/sh -c /tmp/opencv/opencv_install_deps.sh && pip3 install --no-cache-dir opencv-contrib-python~=${OPENCV_VERSION} || /tmp/opencv/build.sh' returned a non-zero code: 1
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/cuauv-jon/Documents/jetson-containers/jetson_containers/build.py", line 103, in <module>
build_container(args.name, args.packages, args.base, args.build_flags, args.simulate, args.skip_tests, args.test_only, args.push, args.no_github_api)
File "/home/cuauv-jon/Documents/jetson-containers/jetson_containers/container.py", line 143, in build_container
status = subprocess.run(cmd.replace(_NEWLINE_, ' '), executable='/bin/bash', shell=True, check=True)
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'DOCKER_BUILDKIT=0 docker build --network=host --tag py312:r35.4.1-cp312-opencv --file /home/cuauv-jon/Documents/jetson-containers/packages/opencv/Dockerfile.pip --build-arg BASE_IMAGE=py312:r35.4.1-cp312-numpy --build-arg OPENCV_VERSION="4.8.1" --build-arg OPENCV_PYTHON="4.x" --build-arg CUDA_ARCH_BIN="7.2,8.7" /home/cuauv-jon/Documents/jetson-containers/packages/opencv 2>&1 | tee /home/cuauv-jon/Documents/jetson-containers/logs/20240429_172346/build/py312_r35.4.1-cp312-opencv.txt; exit ${PIPESTATUS[0]}' returned non-zero exit status 1.
The text was updated successfully, but these errors were encountered:
Setup:
export PYTHON_VERSION=3.12
./build.sh --name=my_container build-essential cmake cuda cudnn gstreamer numpy onnx opencv protobuf:cpp pycuda python pytorch tensorrt tensorflow2 torch2trt torchvision
What works
./build.sh --name=my_container build-essential cmake cuda cudnn gstreamer numpy onnx opencv protobuf:cpp pycuda python pytorch tensorrt tensorflow2 torch2trt torchvision
works but it installs for python 3.8Error
error.txt
Shortened version below:
The text was updated successfully, but these errors were encountered: