如何使用操作系统从Python安装openssl?
我需要从Python运行几个shell命令。除了下面显示的命令外,所有操作都正常如何使用操作系统从Python安装openssl?,python,openssl,Python,Openssl,我需要从Python运行几个shell命令。除了下面显示的命令外,所有操作都正常 import os exec_r = os.system("apt-get install libssl-dev") 在日志中,我看到以下消息: The following additional packages will be installed: libssl-doc libssl1.1 The following NEW packages will be installed: libssl-dev
import os
exec_r = os.system("apt-get install libssl-dev")
在日志中,我看到以下消息:
The following additional packages will be installed:
libssl-doc libssl1.1
The following NEW packages will be installed:
libssl-dev libssl-doc libssl1.1
0 upgraded, 3 newly installed, 0 to remove and 9 not upgraded.
Need to get 4431 kB of archives.
After this operation, 15.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.
似乎我需要将自动应答集成到shell命令中
exec_r = os.system("apt-get install libssl-dev y")
然后我得到一个错误:
E: Unable to locate package y
从apt手册您需要运行apt get-y安装libssl dev从apt手册您需要运行apt get-y安装libssl dev