【已完成】请指教:No module named 'cryptography'
本帖最后由 堡塔运维香菜卷 于 2023-9-5 10:57 编辑为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:7.9
系统版本:win server 2008
问题描述:No module named 'cryptography'
相关截图(日志、错误):
REQUEST_DATE: 2023-09-05 09:15:05
PAN_VERSION: 7.9.0
OS_VERSION: Windows Server 2008 R2 Enterprise (build 7601) x64 (Py3.8.6)
REMOTE_ADDR: 127.0.0.1
REQUEST_URI: POST /panel_sec?action=start_san
REQUEST_FORM: {}
USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36
Traceback (most recent call last):
File "D:\BtSoft\panel/class\panelSite.py", line 20, in
from OpenSSL import crypto
File "C:\Program Files\python\lib\site-packages\OpenSSL\__init__.py", line 8, in
from OpenSSL import crypto, SSL
File "C:\Program Files\python\lib\site-packages\OpenSSL\crypto.py", line 12, in
from cryptography import x509
ModuleNotFoundError: No module named 'cryptography'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\python\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Program Files\python\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Program Files\python\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Program Files\python\lib\site-packages\flask\_compat.py", line 39, in reraise
raise value
File "C:\Program Files\python\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Program Files\python\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functions(**req.view_args)
File "D:\BtSoft\panel\BTPanel\__init__.py", line 585, in panel_sec
import panel_sec
File "D:\BtSoft\panel/class\panel_sec.py", line 10, in
import public, firewalls, panelSite
File "D:\BtSoft\panel/class\panelSite.py", line 25, in
from OpenSSL import crypto
File "C:\Program Files\python\lib\site-packages\OpenSSL\__init__.py", line 8, in
from OpenSSL import crypto, SSL
File "C:\Program Files\python\lib\site-packages\OpenSSL\crypto.py", line 12, in
from cryptography import x509
ModuleNotFoundError: No module named 'cryptography'
您好,您可以尝试先修复一下面板,然后再尝试前面的操作看是否可行;
如果不行,可能是面板依赖的python环境损坏了,先停止宝塔面板,然后将下面这个目录删掉
C:\Program Files\python
然后下载这个包覆盖安装一下看看是否能解决,覆盖安装不影响原来数据与正在运行的网站。
http://download.bt.cn/win/panel/BtSoft.zip 堡塔运维香菜卷 发表于 2023-9-5 09:37
您好,您可以尝试先修复一下面板,然后再尝试前面的操作看是否可行;
如果不行,可能是面板依赖的python环 ...
谢谢,问题已解决。
页:
[1]