Search code examples
pythonwindowsodooodoo-12slugify

No Module named Slugify in Odoo 12


I came across a module from GitHub and I went through the steps to install, but I am getting this error:

Unable to install module because an external dependency is not met: No module named slugify

However, Slugify is installed:

Requirement already satisfied: python-slugify in c:\program files (x86)\python37-32\lib\site-packages (from -r requirements.txt (line 1)) (3.0.3)
Requirement already satisfied: text-unidecode==1.2 in c:\program files (x86)\python37-32\lib\site-packages (from python-slugify->-r requirements.txt (line 1)) (1.2)

I am using the following parameters for testing:

OS: Windows 10 Pro 64 Bit
Odoo 12.0-20181022 (Community Edition)

Can anyone please advise me where I failed?

Thanks in advance for your help.


Solution

  • Open the same python virtual environment that Odoo uses and run:

    try:
        import slugify
    except ModuleNotFoundError:
        import sys
        print("Module not found under the following directories: %s"%sys.path)