How to use Python package on VisionFive

Preparing Software

Make sure the following procedures are performed:

  1. Flash Fedora OS into a Micro-SD card as described in the Flashing Fedora OS to a Micro-SD Card section in the VisionFive Single Board Computer Quick Start Guide.

  2. Log into the Fedora and make sure VisionFive is connected to the Internet. For detailed instructions, refer to the Using SSH over Ethernet or Using a USB to Serial Converter section in the VisionFive Single Board Computer Quick Start Guide.

  3. Execute the pip command on VisionFive Fedora to install the VisionFive.gpio package:

    sudo pip install VisionFive.gpio
    

    Alternatively, you can execute the following command:

    sudo pip3 install VisionFive.gpio
    
  4. (Optional) If you copy the source code to the local directory under VisionFive Fedora, execute the following commands under the source code directory:

    Tip: The source code can be downloaded from: VisionFive.gpio.

    sudo yum install python-devel python3-devel
    sudo python setup.py install
    

    Alternatively, you can execute the following command:

    sudo python3 setup.py install
    
1 Like