【待反馈】升级后登录异常:【No module named 'cryptograph
为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:bt 11.5.0系统版本:centos 7.9
问题描述:登录提示:登录出现异常,请联系宝塔官方人员处理,详情:【No module named 'cryptography'】
相关截图(日志、错误):
宝塔用户_jhazyu 发表于 2026-2-6 14:20
# btpip install cryptography==40.0.2
DEPRECATION: Python 2.7 reach ...
您好,这个是当前的服务器中的Python环境太低了;您那边先做个快照,然后依次执行下面命令
1、将当前Python环境做个备份的操作
mv /www/server/panel/pyenv/ /www/backup/pyenv_backup
2、重新执行覆盖安装命令,会重新下载新的Python环境
if [ -f /usr/bin/curl ];then curl -sSO https://download.bt.cn/install/install_panel.sh;else wget -O install_panel.sh https://download.bt.cn/install/install_panel.sh;fi;bash install_panel.sh ssl251104
如果还是这个问题,那么请继续留言 您好,这个问题是缺少了cryptography 这个依赖导致的;您到服务器SSH终端里执行
btpip install cryptography==40.0.2
然后重启面板
bt restart
重新打开面板的登录界面(建议使用浏览器无痕模式)看下是否还是会出现这个情况。
# btpip install cryptography==40.0.2
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
ERROR: Could not find a version that satisfies the requirement cryptography==40.0.2 (from versions: 0.1, 0.2, 0.2.1, 0.2.2, 0.3, 0.4, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6, 0.6.1, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.9, 0.9.1, 0.9.2, 0.9.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.7, 1.7.1, 1.7.2, 1.8, 1.8.1, 1.8.2, 1.9, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2, 2.2.1, 2.2.2, 2.3, 2.3.1, 2.4, 2.4.1, 2.4.2, 2.5, 2.6, 2.6.1, 2.7, 2.8, 2.9, 2.9.1, 2.9.2, 3.0, 3.1, 3.1.1, 3.2, 3.2.1, 3.3, 3.3.1, 3.3.2)
ERROR: No matching distribution found for cryptography==40.0.2 大炮运维V587 发表于 2026-2-6 09:47
您好,这个问题是缺少了cryptography 这个依赖导致的;您到服务器SSH终端里执行
然后重启面板
# btpip install cryptography==40.0.2
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
ERROR: Could not find a version that satisfies the requirement cryptography==40.0.2 (from versions: 0.1, 0.2, 0.2.1, 0.2.2, 0.3, 0.4, 0.5, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6, 0.6.1, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.9, 0.9.1, 0.9.2, 0.9.3, 1.0, 1.0.1, 1.0.2, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.3, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.7, 1.7.1, 1.7.2, 1.8, 1.8.1, 1.8.2, 1.9, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2, 2.2.1, 2.2.2, 2.3, 2.3.1, 2.4, 2.4.1, 2.4.2, 2.5, 2.6, 2.6.1, 2.7, 2.8, 2.9, 2.9.1, 2.9.2, 3.0, 3.1, 3.1.1, 3.2, 3.2.1, 3.3, 3.3.1, 3.3.2)
ERROR: No matching distribution found for cryptography==40.0.2 #btpython -m pip install --upgrade pip
# bt restart
通过以上命令得到解决,特提交,谢谢团队的指导和帮助。
页:
[1]