Skip to main content
 首页 » 编程设计

python之找不到蒸馏分布错误

2024年10月25日14think

我在 django 项目中使用 alembic 和 virtualenv,我在路径中创建了一个虚拟环境

/ENV 
/myproject 

在我的项目中,我有一个 configs/development.ini 文件,我在其中定义了 alembic 参数

script_location = ../ENV/bin/alembic 

当我尝试运行 alembic 时

alembic -c configs/development.ini upgrade head 

我收到以下错误

The 'Mako' distribution was not found and is required by alembic 

请您参考如下方法:

您需要正确安装 Alembic 及其依赖项(例如 Mako)。在您的 virtualenv 中,运行命令 pip install alembic,这将自动为每个包引入依赖项。