Unable to install PyQt5 on Jetson nano

Tried to install PyQt5 by multiple ways. Getting error as “Error: Unable to created the C++ code”. Please help me with this.

Hello,

Your topic will be best served in the Jetson category.

I will move this over for visibility.

Cheers,
Tom

1 Like

Hi,
“Error: Unable to created the C++ code” resolved by upgrading the pip version.
After running command “pip install PyQt5” in python virtual environment getting "Memory error " and the execution is getting killed.
Please help me with this Memory error
Also tried by swapping 8GB memory but error is still there.

Entire log is here:
nvidia@nvidia-desktop:~$ pip install PyQt5
Collecting PyQt5
Using cached PyQt5-5.15.10.tar.gz (3.2 MB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … error
ERROR: Exception:
Traceback (most recent call last):
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py”, line 180, in exc_logging_wrapper
status = run_func(*args)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py”, line 245, in wrapper
return func(self, options, args)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/commands/install.py”, line 377, in run
requirement_set = resolver.resolve(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 95, in resolve
result = self._result = resolver.resolve(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 397, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 173, in _add_to_criteria
if not criterion.candidates:
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py”, line 156, in bool
return bool(self._sequence)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 155, in bool
return any(self)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py”, line 47, in _iter_built
candidate = func()
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py”, line 182, in _make_candidate_from_link
base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py”, line 228, in _make_base_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 293, in init
super().init(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 156, in init
self.dist = self._prepare()
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 225, in _prepare
dist = self._prepare_distribution()
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 525, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 640, in _prepare_linked_requirement
dist = _get_prepared_distribution(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py”, line 71, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py”, line 67, in prepare_distribution_metadata
self.req.prepare_metadata()
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/req/req_install.py”, line 577, in prepare_metadata
self.metadata_directory = generate_metadata(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/operations/build/metadata.py”, line 35, in generate_metadata
distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/utils/misc.py”, line 772, in prepare_metadata_for_build_wheel
return super().prepare_metadata_for_build_wheel(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_impl.py”, line 186, in prepare_metadata_for_build_wheel
return self._call_hook(‘prepare_metadata_for_build_wheel’, {
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_impl.py”, line 311, in _call_hook
self._subprocess_runner(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/utils/subprocess.py”, line 252, in runner
call_subprocess(
File “/home/nvidia/Desktop/VENV/pyVenv/lib/python3.8/site-packages/pip/_internal/utils/subprocess.py”, line 166, in call_subprocess
line: str = proc.stdout.readline()
MemoryError

Hi,
Please refer to the posts:
PySide2 (Qt for python) installation on Jetson Xavier - #5 by Muscle_Oliver
Jetson Nano and Qt5 - #2 by WayneWWW
Pyqt not working on Nano - #4 by coolbot
How to Install PyQt5 Jetson nano - #2 by prince.alondra
Installing QT6 and PySide6 on Jetson Orin Nano

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.