Python Upgrade on Jetson Nano - Tutorial

Поділитися
Вставка
  • Опубліковано 16 лис 2024

КОМЕНТАРІ • 65

  • @viorelnegoita
    @viorelnegoita Рік тому +5

    OpenCV works in Python3.6.9, how do I make it work in Python 3.8 and 3.11? Thanks

  • @imadjawad4408
    @imadjawad4408 Рік тому

    Hi Jim, thanks for your time! I'm having a problem installing ServoKit, it give errors in the middle of the installation process, I updated pip3, and it started giving me user privileges errors, now I will try this installation, and then ServoKit, I read that the virtual environment may fix these root/admin issues, thanks again😀

  • @MichaelSounhein
    @MichaelSounhein Рік тому +1

    Thanks! This is great and was something I was struggling with a bit with. I wonder if smaller LLM models can run on Jetson Orin Nano, as many require a newer Python version than what ships with it.

    • @JetsonHacks
      @JetsonHacks  Рік тому

      You are welcome. It's a little bit easier to upgrade Python on the Orin Nano, as you can use the Deadsnakes PPA. This gives you access to the newer Python versions (as well as some of the older ones too). You don't have to build from source, like is done here. Thanks for watching!

    • @MichaelSounhein
      @MichaelSounhein Рік тому +1

      @@JetsonHacks Thanks for the reply!

  • @georgegu3374
    @georgegu3374 10 місяців тому

    i would recommand pyenv to install&manage multiple versions of Python

    • @JetsonHacks
      @JetsonHacks  10 місяців тому

      Thank you for sharing this, it's certainly a useful idea. Thanks for watching!

  • @Bwajster
    @Bwajster 5 місяців тому +1

    How do I auto run a python script after reboot on Jetson Nano? I’ve added the absolute path of python3 followed by the absolute path of the .py file under the command section of the Startup Application window. However, the .py file doesn’t run after rebooting the Jetson Nano. How can I fix this issue?

    • @JetsonHacks
      @JetsonHacks  5 місяців тому

      It's hard to tell without knowing how your script works. Here's a response video that may help: ua-cam.com/video/ExBxUcjIv9g/v-deo.html Thanks for watching!

  • @xavierarambula315
    @xavierarambula315 8 місяців тому

    python3.11-full did not show up in my reposotiroy on jetson nano..

  • @viorelnegoita
    @viorelnegoita Рік тому

    Great videos. Do you have one for installing a newer version of OpenCV?

  • @franciscolucas348
    @franciscolucas348 2 місяці тому +1

    THANKS!!!

    • @JetsonHacks
      @JetsonHacks  2 місяці тому

      You are welcome, and thanks for watching!

  • @JohnK68
    @JohnK68 Рік тому

    Would love to see you featuring the Jetank what you think about it etc.

    • @JetsonHacks
      @JetsonHacks  Рік тому

      Looks like a fun little robot! Thank you for the suggestion, and thanks for watching!

    • @JohnK68
      @JohnK68 Рік тому

      @@JetsonHacks The Jetank has not a flawless design. And the building video is challenging to follow. Lucky me i have a 3d printer to address some design flaws. But in the end i think someone can learn a lot of valuable stuff. Again i would love to see a educational critical video about the design, and the overall value of this kit.

    • @JetsonHacks
      @JetsonHacks  Рік тому

      @@JohnK68 Sounds like you understand the issues well! Looking forward to your video about it.

    • @JohnK68
      @JohnK68 Рік тому

      @@JetsonHacks Sorry but brining tech in an entertaining way is not a skill i am aware off. And from what i have seen from your channel 2 thumbs up!!!

  • @pablocarmona2485
    @pablocarmona2485 2 місяці тому

    Hi i'm currently working on a project that uses python 3.11, but have to adapt it to jetson nano. We use someface detection models so I need the GPU, as far as I've seen there's no way to use gpu from another python different from the one that is built in with the jetpack. Please if you know a way to use the GPU from your other python installs it would be of much help!

    • @JetsonHacks
      @JetsonHacks  2 місяці тому

      I don't think I understand enough about your issue to help give an answer. Usually Python is bound to the libraries that are using the GPU (PyTorch, Tensorflow, etc), not the GPU libraries themselves. You should ask for help in the official NVIDIA Jetson Nano forum. Thanks for watching!

  • @heinrichhelmbold419
    @heinrichhelmbold419 10 місяців тому

    Absolutely incredible videos and it is really clear you know what you talking about and really understand the architecture. Any chance you can explain how you would install OpenCV with Cuda support now for Python 3.11? Your comprehensive guide on OpenCV with Cuda is incredible, but I am now completely lost because of the 2 different versions of Python 3 on the Jetson. I need to use Tensorflow so I installed Python3.11 and running in a virtual environment, but now I cannot get OpenCV installed because it is installed for 3.6. I don't mind building it again if that is what's needed - but not sure how to do it for python 3.11 as I cannot see in any of the build commands where to specify for which version it is.

    • @JetsonHacks
      @JetsonHacks  10 місяців тому

      OpenCV has several optional flags you can use in the cmake definitions:
      -D PYTHON3_EXECUTABLE=$(which python3.x) \ # Replace 'python3.x' with your specific version
      -D PYTHON_INCLUDE_DIR=/path/to/python/include \
      -D PYTHON_INCLUDE_DIR2=/path/to/python/include \
      -D PYTHON_LIBRARY=/path/to/python/library \
      -D PYTHON3_NUMPY_INCLUDE_DIRS=/path/to/numpy/headers \
      That should get you closer to using 3.11.

    • @heinrichhelmbold419
      @heinrichhelmbold419 10 місяців тому +1

      @@JetsonHacks Thank you so much! Every day I learn a bit more :-) I truly appreciate your videos and what you are doing for the Jetson community.

    • @heinrichhelmbold419
      @heinrichhelmbold419 10 місяців тому +1

      3 days later and I finally have everything up and running thanks to you. Your advice made all the difference and I am truly grateful. 🥳

    • @JetsonHacks
      @JetsonHacks  10 місяців тому

      @@heinrichhelmbold419 Thank you for the kind words. I am glad you were able to get it to work. Have a great new year!

  • @MWArduino
    @MWArduino Рік тому

    great! but is cuda/torch working with python3.11? As it is installed in parallel, it does not look like a problem if not

    • @JetsonHacks
      @JetsonHacks  Рік тому

      I would use the NVIDIA supported Docker images available on NGC for that kind of combination. There's lots of dependencies that need to be wrangled. Thanks for watching!

  • @heinrichhelmbold419
    @heinrichhelmbold419 10 місяців тому +1

    Thanks!

    • @JetsonHacks
      @JetsonHacks  10 місяців тому

      Thank you very much for this generous donation! I will use it to help make better content.

    • @heinrichhelmbold419
      @heinrichhelmbold419 10 місяців тому +1

      ​@@JetsonHacksIt's the least I can do to say thank you, and there will be more donations for sure. Wish it could buy real coffee and time with you 😂 So much I wish I understood

    • @JetsonHacks
      @JetsonHacks  10 місяців тому

      @@heinrichhelmbold419 What a nice response! Thank you.

  • @bbbtechnical9704
    @bbbtechnical9704 Рік тому

    Hi Sir, i have two Jetson module...one is nano 2G and one is 4G. How to make a cluster so that I can use them for ML training.

    • @JetsonHacks
      @JetsonHacks  Рік тому +1

      This is more than can be explained in a YT comment. Please ask this question on the official NVIDIA Jetson Nano forum, where a large group of developers and NVIDIA engineers share their experience: forums.developer.nvidia.com/c/agx-autonomous-machines/jetson-embedded-systems/jetson-orin-nano/632 Thanks for watching!

    • @bbbtechnical9704
      @bbbtechnical9704 Рік тому

      @@JetsonHacks thank you sir. I can expect a video from you 😔.

  • @MegaGippie
    @MegaGippie 2 місяці тому

    hi man, thanks for the video. I tryed it by myself and faild with the build script...
    The instalation fails after 10 seconds with the same error that you got, but much earlier.
    The error:
    dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
    dpkg-buildpackage: warning: (Use -d flag to override.)
    debuild: fatal error at line 1182:
    dpkg-buildpackage -us -uc -ui -i -I failed
    gbp:error: 'debuild -i -I -uc -us' failed: it exited with 29
    I am trying to install python 3.11 on a Orin NX Dev kit 16GB. Currently running on Ubuntu 20.04
    Can you help me out?

    • @JetsonHacks
      @JetsonHacks  2 місяці тому

      I don't think those scripts would work on 20.04. They are for Ubuntu 18.04. You should follow the instructions on the dead snakes site for a currently supported platform: launchpad.net/~deadsnakes/+archive/ubuntu/ppa

  • @gerardjulien2118
    @gerardjulien2118 5 місяців тому

    Hi, Thanks for the video. Unfortunately it does not work in my case
    I have an Jetson Orin Nx, which is close to a Jetson Nano
    I replaced "git checkout ubuntu/bionic" by "git checkout ubuntu/focal" to match my ubuntu2004 in the script but it is not enough to do the trick
    ---
    Thanks in advance.

    • @JetsonHacks
      @JetsonHacks  5 місяців тому +1

      The Jetson Nano does not support Focal, therefore there is no ubuntu/focal branch to check out. Perhaps you can go to a directly supported repository? launchpad.net/~deadsnakes/+archive/ubuntu/ppa
      Thanks for watching.

    • @gerardjulien2118
      @gerardjulien2118 5 місяців тому +1

      @@JetsonHacks Thanks for the link.

  • @hssnov
    @hssnov Рік тому

    Last two weeks i was trying to do this even when i am getting to install p3.11 i am still having an error when installing cv2 with cuda.
    I hope also you tell us if there is a way to link python 3.11 with cv2 cuda. Thank you.

    • @JetsonHacks
      @JetsonHacks  Рік тому

      I don't quite understand your question. Are you able to get Python 3.11 running? Did you build OpenCV with CUDA against Python 3.11. I don't know what the error messages might mean.

    • @hssnov
      @hssnov Рік тому

      @@JetsonHacks
      I apologize when i am building the cv2 on python3.11 it will show everything ok but at the same time when i run Jtop i get cv2 not compiled with cuda. I will try your way and let you know. I am very thankful to you because i never used Jetson but after watching your vids i was able to implement image processing stuff for my university project.
      Thank you.

    • @egbertprogrammer4408
      @egbertprogrammer4408 Рік тому

      @@hssnov make sure opencv is replacing the one installed by jetson. There was a bug in opencv build, where it 'installs' but not registers. Not sure if this is the case with the current release.

  • @nhatpham5797
    @nhatpham5797 5 місяців тому

    I can use tkinter in 3.8.12, can you help me :(

    • @JetsonHacks
      @JetsonHacks  5 місяців тому

      I don't what what you're asking. tkinter is part of Python.

    • @nhatpham5797
      @nhatpham5797 5 місяців тому

      @@JetsonHacks I know, but jetson nano's Python is 3.6.9, when i use 3.6.9, i can import tkinter but if i use 3.8.12, i cant import tkinter

    • @JetsonHacks
      @JetsonHacks  5 місяців тому

      @@nhatpham5797 First, check to see if tkinter is installed: python -m tkinter
      If not, you will need to install it. The installation will depend on how you intend to use it, for example if you're using a virtual environment or not. You should be able to find tutorials on the web to help you, that's not something I can help you with.

  • @alexsalgado
    @alexsalgado Рік тому

    Is it possible to install isaac-ros on jetson nano? any reference?

    • @JetsonHacks
      @JetsonHacks  Рік тому +1

      I think it ran on pre-releases. I believe that the production versions are for JetPack 5 (Jetson Orin or Xavier). You can ask on the forum: forums.developer.nvidia.com/c/agx-autonomous-machines/isaac/isaac-ros/600

  • @bxoz3352
    @bxoz3352 Рік тому

    Good morning!
    I built opencv with cuda support and it works now for python3.6
    however i cannot import after installing python3.8
    please tell me there is a way to use the same package without building everything from scratch

    • @JetsonHacks
      @JetsonHacks  Рік тому

      It's difficult to say without knowing a lot more about how you run your Python setup. What did you do to install the new OpenCV on Python3.8?

    • @bxoz3352
      @bxoz3352 Рік тому

      @@JetsonHacks I installed opencv at first using your tutorial and it was on python3.6 the base version
      Now i need to use python3.8, i installed since it was already on the system (i followed this video).
      When i use python3 i can import cv2 and it works perfectly
      But when i use python3.8 i cannot import cv2

    • @JetsonHacks
      @JetsonHacks  Рік тому

      @@bxoz3352 How did you install it for 3.8?

    • @bxoz3352
      @bxoz3352 Рік тому

      @@JetsonHacks i did not install opencv for 3.8
      I just want a way to use opencv with cuda for both 3.6 and 3.8

    • @bxoz3352
      @bxoz3352 Рік тому

      @@JetsonHacks i meant i installed python3.8 sorry**

  • @ProlRayder
    @ProlRayder 8 місяців тому

    Ultralytics library works?

    • @JetsonHacks
      @JetsonHacks  8 місяців тому

      I don't have any experience with ultralytics. Thanks for watching!