gpt4 book ai didi

python - 导入错误 : No module named 'passlib.totp'

转载 作者:行者123 更新时间:2023-12-04 09:23:57 24 4
gpt4 key购买 nike

当我尝试在 ubuntu 16 上安装 pgAdmin4 时遇到问题 :( 和 pip install passlib 不要帮助我。有人知道如何解决吗?

    from pgadmin.model import db, User, Version, ServerGroup, Server, \
File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 25, in <module>
from flask_security import Security, SQLAlchemyUserDatastore, current_user
File "/usr/lib/python3/dist-packages/flask_security/__init__.py", line 16, in <module>
from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
File "/usr/lib/python3/dist-packages/flask_security/core.py", line 60, in <module>
from .totp import Totp
File "/usr/lib/python3/dist-packages/flask_security/totp.py", line 12, in <module>
from passlib.totp import TOTP, TokenError
ImportError: No module named 'passlib.totp'
dpkg: error processing package pgadmin4-apache2 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python-passlib (1.7.1-1.pgdg16.04+1) ...
Errors were encountered while processing:
pgadmin4-apache2
E: Sub-process /usr/bin/dpkg returned an error code (1)```

最佳答案

试试这个,这对我有用。

**sudo pip install "passlib==1.7.2"**
引用: - https://nomodulenamed.com/m/passlib.totp

关于python - 导入错误 : No module named 'passlib.totp' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63051164/

24 4 0