Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
1197 Weergaven

I exported a list of nomenclatures for a particular product in excel format (.xlsx) and want to import the same as nomenclature for another product.

But during importation, an error is generated asking me to install the module "openpyxl". 

I installed the module successfully using command (pip install openpyxl) from my odoo terminal but the same error is still generated


Please help me to sort that out.

Avatar
Annuleer
Beste antwoord

Ensure you have the correct version of openpyxl installed for you version of Odoo.

The correct version can be found in the requirements.txt of your setup, or in GitHub: https://github.com/odoo/odoo/blob/18.0/requirements.txt (make sure you select the correct branch here as this link is for Odoo 18).

However, since openpyxl is a core requirement changes are that you are missing others as well. Therefore you should install the whole list. You can simply do so by running

python -m pip install -r requirements.txt


Also pip only - and same goes for python only - is linked to a specific version of python (or even a virtual environment) in your system. Depending on your system "pip" could mean the package installer for python2 OR python3, more so it could mean pythonX.y OR pythonX.z.

If you're unsure you can give python3 -m pip install requirements.txt a try since this at least will mean a python3 env - whether it's the same your Odoo server is running on or not needs to be figured by you. One way to check is to use htop in cli:

htop

Using this tool, you can then hit F4 and filter for odoo-bin. Whatever path is given for /.../.../.../python there can then be used to run above pip install (make sure the path to the requirements.txt is correct as well).

Apart from that, you probably want to restart your Odoo server after installing all packages.

Avatar
Annuleer
Beste antwoord

Problem:

You installed openpyxl (for Excel imports), but Odoo still doesn’t recognize it. Here’s how to fix it easily.

Why This Happens

Odoo uses its own Python environment, so installing openpyxl globally (with regular pip) won’t work. You need to install it where Odoo can see it.

Step-by-Step Fix
1. Find Odoo’s Python Path
  • If you installed Odoo manually, its Python is usually in:
    bash
    /path/to/odoo-venv/bin/python  # Example path
  • If you used apt/docker, Odoo’s Python might be:
    bash
    /usr/bin/python3
2. Install openpyxl Correctly

Run:

bash

# For manual installations (venv):
source /path/to/odoo-venv/bin/activate  # Activate Odoo’s environment
pip install openpyxl

# For system-wide installations:
sudo /usr/bin/python3 -m pip install openpyxl
3. Verify Installation

Check if Odoo can see openpyxl:

bash

/path/to/odoo/python -c "import openpyxl; print('Success!')"

(If you see Success!, it’s installed correctly.)

4. Restart Odoo
  • Linux (systemd):
    bash
    sudo systemctl restart odoo
  • Docker:
    bash
    docker-compose restart odoo
  • Manual: Stop and restart Odoo manually.
Still Not Working?
  • Permission Issues: Ensure Odoo’s user has access:
    bash
    sudo chown -R odoo:odoo /path/to/odoo-venv
  • Check odoo.conf: Ensure no weird Python path settings exist.
Done!

Your Excel imports should now work. 🎉

🚀 Did This Solve Your Problem?

If this answer helped you save time, money, or frustration, consider:

✅ Upvoting (👍) to help others find it faster

✅ Marking as "Best Answer" if it resolved your issue

Your feedback keeps the Odoo community strong! 💪

(Need further customization? Drop a comment—I’m happy to refine the solution!)

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
jul. 25
2333
0
jul. 25
328
1
jul. 25
726
1
mei 25
838
1
apr. 25
1304