【问题标题】:No Module named Slugify in Odoo 12Odoo 12 中没有名为 Slugify 的模块
【发布时间】:2020-01-08 02:18:36
【问题描述】:

我在 GitHub 上发现了一个模块,我完成了安装步骤,但我收到了这个错误:

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

但是,Slugify 已安装:

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)

我正在使用以下参数进行测试:

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

谁能告诉我我失败的地方?

提前感谢您的帮助。

【问题讨论】:

  • 您使用的是源代码还是可执行文件?
  • Slugify 是通过 'pip3 install python-slugify' 安装的
  • 我的意思是 Odoo,你如何运行它
  • Odoo 安装为 git 源代码

标签: python windows odoo odoo-12 slugify


【解决方案1】:

打开与Odoo相同的python虚拟环境并运行:

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

【讨论】:

  • 你是对的。错误是我为另一个 python 环境安装了 slugify。现在它工作正常。非常感谢。
猜你喜欢
  • 1970-01-01
  • 2021-05-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-03-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多