You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Odoo 10社区版安装hw_scanner模块失败求助:缺少evdev依赖

Fix: "No module named evdev" Error When Installing Odoo 10's Barcode Scanner Hardware Driver

Ah, I’ve run into this exact dependency snag with Odoo 10 Community Edition’s barcode scanner module before. The error is straightforward: your server lacks the Python evdev library, which the hw_scanner module relies on to interact with input devices like your barcode scanner.

Let’s get this sorted out step by step:

1. Install the Python evdev package

The command you’ll use depends on your OS and how you’ve set up Odoo’s Python environment:

Debian/Ubuntu-based systems (most common for Odoo)

  • System Python setup: Run these commands with sudo/root privileges:
    sudo apt update
    sudo apt install python-evdev
    
  • Virtual environment setup (recommended for keeping dependencies isolated):
    First activate your Odoo virtual environment (adjust the path to match your setup), then install via pip:
    source /path/to/your/odoo-virtualenv/bin/activate
    pip install evdev
    

RHEL/CentOS systems

sudo yum install python-evdev
# Or if using pip (system or venv)
pip install evdev

2. Confirm the installation worked

To make sure evdev is properly installed for the Python version Odoo uses, run this quick test:

python -c "import evdev; print('evdev installed successfully!')"

If you see the success message, you’re ready to move on.

3. Retry installing the barcode scanner module

Head back to your Odoo instance’s Apps menu, search for Barcode Scanner Hardware Driver again, and click Install. The dependency error should be gone now.

Extra tips to avoid future headaches

  • Ensure your Odoo service user has permission to access input devices. On Linux, add the user to the input group:
    sudo usermod -aG input odoo
    
    Then restart the Odoo service for the change to take effect.
  • If you still hit issues, double-check that evdev is installed for the same Python version Odoo is running. You can confirm Odoo’s Python version with odoo --version, then test with pythonX.X -c "import evdev" (replace X.X with the version number).

内容的提问来源于stack exchange,提问作者DMS-KH

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:08:09