Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Results 1 to 6 of 6

Thread: How can I install Python modules?

  1. #1

    Title
    Forum Supporter
    Donated Member
    Join Date
    Apr 2015
    Posts
    61
    Thanks
    0
    Thanked 5 Times in 4 Posts

    How can I install Python modules?

    Apologies if this question is posted in the wrong place - this seemed the least inappropriate.

    I'm looking to run some Python scripts on my PVR's (one Vu, one GigaBlue, one Miraclebox). These are scripts that I am developing on a Windows PC. The scripts require and hence import a number of standard Python modules (eg. "yaml") and when I run the scripts on the PVR they immediately fail when trying to import the yaml module.

    On my Windows box I use a utility called pip to install standard Python modules but I can't find pip on the OpenVix PVR. I've tried "opkg install yaml" but it couldn't find anything to match. From a ChatGPT suggestion I also tried downloading "get-pip.py" and running that but it failed with "No module named 'py_compile'".

    Can anyone please help by pointing me to how I should install standard Python modules on an OpenVix PVR?

    Many thanks,
    Dan

  2. #2
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,858
    Thanks
    239
    Thanked 1,673 Times in 1,318 Posts
    The first thing to realize is that if you are installing other Python modules you should not install them to the standard system locations, as if you do they will be removed any time you flash a new installation.
    Last edited by birdman; 03-04-24 at 00:44.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  3. #3
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts
    If you want modules that are not there you either need to install manually, or build your own images.
    Help keep OpenViX servers online.Please donate!

  4. #4

    Title
    Forum Supporter
    Donated Member
    Join Date
    Apr 2015
    Posts
    61
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Thanks for the responses. I've been working away at trying to get things working and have been mainly successful on my Vu duo4kse. I was able to get PIP running eventually and use pip to install most of what I need. I will modify my code to circumvent the rest.

    I then turned my attention to the second of my PVR's - a GigaBlue X2 running OpenViX 6.2.011 (I think that's the latest version supported for this box). On the GigaBlue I'm running into additional problems installing the python3-xmlrpc package with opkg. This needs to be installed to get pip working. I have run "opkg update" and can see the package in the output from "opkg list", but when I run "opkg install python3-xmlrpc" I get the following:

    Installing python3-xmlrpc (3.10.4) on root.
    Downloading http://www.openvix.co.uk/feeds/openv...0_mips32el.ipk.
    * opkg_download_backend: Failed to download http://www.openvix.co.uk/feeds/openv...0_mips32el.ipk, wget returned 8.
    * opkg_install_pkg: Failed to download python3-xmlrpc. Perhaps you need to run 'opkg update'?
    * opkg_solver_install: Cannot install package python3-xmlrpc.

    I've looked on the openvix server and, sure enough, the "6.2" directory is not there - there's directories for 6.3, 6.4, and 6.5 but no earlier ones.

    If I knew how I would redirect opkg to get the file from the 6.3 directory instead but opkg is a bit of a black box. Is it possible for the 6.2 directory to be restored so that I can get through this hurdle?

    Thanks,
    Dan

  5. #5
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,858
    Thanks
    239
    Thanked 1,673 Times in 1,318 Posts
    Quote Originally Posted by point17 View Post
    If I knew how I would redirect opkg to get the file from the 6.3 directory instead but opkg is a bit of a black box.
    Given that they are both mips32el you could try downloading the 6.3 version for gb73625 and install that.

    Mind you, it has dependencies for:
    python3-compression, python3-core, python3-crypt, python3-datetime, python3-email, python3-html, python3-io, python3-math, python3-mime, python3-netclient, python3-netserver, python3-numbers, python3-pydoc, python3-stringold, python3-xml
    so this could lead to a lot of manual downloads.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  6. #6
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,541
    Thanks
    6,517
    Thanked 9,224 Times in 6,287 Posts
    Maybe build ViX images yourself or install another image with active feeds for the receivers such as ATV 7.3?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.