Skip to content

Installation

This guide will help you install the Blockly Python Executor on your system.

System Requirements

Minimum Requirements

  • Operating System: Windows 10+, macOS 10.14+, or Linux (Ubuntu 18.04+)
  • RAM: 4 GB minimum, 8 GB recommended
  • Storage: 500 MB free space
  • Python: 3.8+ (for drone control features)

For Drone Control

  • PMini Drone: Compatible drone hardware
  • Network: Local network connection to drone
  • Python Packages: pmini_sdk_python (installed automatically)

Installation Methods

Windows

  1. Download the latest .exe installer from the releases page
  2. Run the installer as administrator
  3. Follow the installation wizard
  4. Launch from Start Menu or desktop shortcut

macOS

  1. Download the latest .dmg file from the releases page
  2. Open the .dmg file
  3. Drag the application to your Applications folder
  4. Launch from Applications or Spotlight

Linux

  1. Download the appropriate package for your distribution:
  2. Debian/Ubuntu: .deb package
  3. Red Hat/Fedora: .rpm package
  4. Universal: .AppImage file
  5. Archive: .tar.gz file

  6. For .deb packages:

    sudo dpkg -i blockly-python-executor_1.0.0_amd64.deb
    sudo apt-get install -f  # Fix any dependency issues
    

  7. For .rpm packages:

    sudo rpm -i blockly-python-executor-1.0.0.x86_64.rpm
    

  8. For AppImage:

    chmod +x blockly-python-executor-1.0.0.AppImage
    ./blockly-python-executor-1.0.0.AppImage
    

Method 2: Build from Source

Prerequisites

  • Node.js: 16.0.0 or higher
  • npm: 8.0.0 or higher
  • Python: 3.8+ with pip
  • Git: For cloning the repository

Build Steps

  1. Clone the repository:

    git clone https://gitlab.com/yourname/blockly-python-executor.git
    cd blockly-python-executor
    

  2. Install dependencies:

    npm install
    

  3. Prepare Python environment:

    npm run prepare-venv
    

  4. Build the application:

    npm run build
    

  5. Run in development mode:

    npm run dev
    

  6. Create distribution packages:

    # For your current platform
    npm run dist
    
    # For specific platforms
    npm run dist-win    # Windows
    npm run dist-mac    # macOS
    npm run dist-linux  # Linux
    

Drone Setup (Optional)

If you want to use drone control features:

1. Install Python Dependencies

The application will automatically install the required Python packages, but you can also install them manually:

pip install pmini_sdk_python

2. Connect Your Drone

  1. Ensure your PMini drone is powered on
  2. Connect to the same network as your computer
  3. The drone should be accessible at localhost:50051

3. Verify Connection

  1. Launch the Blockly Python Executor
  2. Click "Connect Server" to start the drone server
  3. Check the status indicator - it should show "Connected" when successful

Verification

After installation, verify everything is working:

  1. Launch the application
  2. Check the interface - You should see the Blockly workspace
  3. Test basic functionality:
  4. Drag a "print" block from the Text category
  5. Add a text block with "Hello, World!"
  6. Click "Run Code" to see the output in the terminal

  7. Test drone connection (if applicable):

  8. Click "Connect Server"
  9. Wait for "Connected" status
  10. Try a simple takeoff block

Troubleshooting

Common Issues

Application Won't Start

  • Check system requirements - Ensure you have the minimum RAM and storage
  • Run as administrator (Windows) or with sudo (Linux)
  • Check antivirus software - Some antivirus programs block Electron apps

Python Code Won't Execute

  • Check Python installation - Ensure Python 3.8+ is installed and in PATH
  • Verify backend server - Click "Connect Server" to start the backend
  • Check terminal output - Look for error messages in the terminal pane

Drone Connection Issues

  • Verify drone is powered on and connected to network
  • Check network connectivity - Ensure you can reach the drone
  • Restart the application - Sometimes a fresh start helps
  • Check firewall settings - Ensure port 50051 is not blocked

Build Issues

  • Update Node.js - Ensure you have Node.js 16+ and npm 8+
  • Clear npm cache - Run npm cache clean --force
  • Delete node_modules - Remove and reinstall: rm -rf node_modules && npm install

Getting Help

If you encounter issues not covered here:

  1. Check the logs - Look in the terminal pane for error messages
  2. Search existing issues - Check the GitLab issues
  3. Create a new issue - Provide details about your system and the problem
  4. Join discussions - Ask questions in the community discussions

Next Steps

Once you have the application installed and running:

  1. Follow the Quick Start Guide to create your first program
  2. Explore the Block Reference to learn about available blocks
  3. Try the Examples to see what's possible
  4. Read the User Guide for detailed instructions