Deploy and Debug python application on Verdin IMX88MM board

Hi,
After connecting my device(Verdin IMX8MM) to my sample python application, I want to deploy and debug the code. I tried to deploy the code using visual studio extension for Torizon I am getting few errors. One of the error is “The default device architecture is aarch64 but you are trying to deploy for arm” when I am selecting “ARM 7/8” from run debug option. My seeting.json file shows " “torizon_gpu”: “-vivante”, and “torizon_arch”: “aarch64”

On choosing python-local from run and debug option it throws " Torizon : host-install-pip-requirements failed with exit code 1603" error

Please let me know what the issue is.

Thanks
Pramod

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

It appears you’re encountering two distinct issues while trying to deploy and debug your Python application on a Verdin iMX8MM board using Visual Studio Code with the Torizon extension.

  1. Architecture Mismatch Error: The error message “The default device architecture is aarch64 but you are trying to deploy for arm” suggests there’s a mismatch between the target architecture of your project and the architecture of your Verdin iMX8MM board. The Verdin iMX8MM board uses an ARMv8 architecture (aarch64), which is a 64-bit architecture. Ensure that when you start the debug session, you select the correct architecture that matches your board. Since your settings.json file indicates "torizon_arch": "aarch64", you should select the Torizon ARMv8 option in the Run and Debug settings in Visual Studio Code to match the architecture of your Verdin iMX8MM board.

  2. Error Code 1603 During Python-local Deployment: The “Torizon: host-install-pip-requirements failed with exit code 1603” error typically indicates a failure in installing Python package dependencies on your host machine. This can be due to various reasons, such as issues with the Python environment on your host, lack of permissions, or problems with the specific packages you’re trying to install. To troubleshoot this issue, consider the following steps:

    • Ensure that your host machine has a compatible version of Python installed and that pip is properly configured and up to date.
    • Check the permissions of your Python environment. Running Visual Studio Code as an administrator (or using sudo on Linux) might resolve permission-related issues.
    • Review the requirements.txt file of your Python project to ensure that all listed packages are correct and compatible with your Python environment.
    • Manually run pip install for the packages listed in requirements.txt in your terminal or command prompt to see if any specific package is causing the issue. This can provide more detailed error messages that can help in diagnosing the problem.

By addressing these two issues—ensuring the correct architecture is selected for debugging and resolving the pip requirements installation error—you should be able to successfully deploy and debug your Python application on the Verdin iMX8MM board.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

How to Use UART on Torizon OS | Toradex Developer Center.

On selecting " Torizon ARMv8" from run/debug option I am getting the following error
" ERROR :: host-install-pip-requirements failed with exit code 1".

I checked the detailed error and here what find in the terminal section.

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

  • The terminal process “/bin/python3 ‘-m’, ‘pip’, ‘install’, ‘-r’, ‘requirements-local.txt’” terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

Thanks
Pramod

Greetings @samalpamod,

As the error message suggests you should try creating a virtual environment to install your packages for debugging/development. When you generated your project using our template there should be a README file in your project as well. This README should describe the virtual environment process.

Best Regards,
Jeremias

Hi Jeremias,
As suggested, I have checked the Readme.md file and created an virtual environment for the same. Though I am not getting any error, I am not getting any error or success response.

Thanks
Pramod

Though I am not getting any error, I am not getting any error or success response.

In detail, what are you seeing now then?

Best Regards,
Jeremias

Hi @samalpamod,
I assume that your issue has been solved after your visit to our office.
We are closing this ticket now.