gpt4 book ai didi

python-2.7 - mhn 安装在 linux ubuntu 18.04 上失败

转载 作者:行者123 更新时间:2023-12-04 18:43:17 24 4
gpt4 key购买 nike

我正在尝试在全新安装的 ubuntu 18.04 上安装 mhn(现代蜂蜜网络)
我得到了这些错误。

Initializing` database, please be patient. This can take several minutes
+ python initdatabase.py
Traceback (most recent call last):
File "initdatabase.py", line 5, in <module>
create_clean_db()
File "/opt/mhn/server/mhn/__init__.py", line 116, in create_clean_db
db.create_all()
File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 963, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 955, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 896, in get_engine
return connector.get_engine()
File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 556, in get_engine
self._sa.apply_driver_hacks(self._app, info, options)
File "/opt/mhn/env/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 861, in apply_driver_hacks
info.database = os.path.join(app.root_path, info.database)
AttributeError: can't set attribute```

how to fix this?

最佳答案

您需要做的就是进入 mhn/server/并修改 requirements.txt 文档,将 Flask-SQLAlchemy 更改为 2.5.1,保存文件并使用 sudo 运行安装。应该在18.04 Ubuntu上安装就好了,只有亲自测试过的版本,里程可能会很大。

关于python-2.7 - mhn 安装在 linux ubuntu 18.04 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66697421/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com