你好煎蛋卷,我通过os.system('pip install colorama')
它下载模块输出:
Requirement already satisfied: colorama
in c:\users\ilyas\appdata\local\programs\python\python310\lib\site-packages (0.4.4)
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the 'C:\Users\ilyas\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.
我想隐藏它,因为我同时在控制台中显示下载,据我所知,将其称为静默安装是正确的......
使用标志
--quiet
。在这里你可以阅读英文
我还测试了新安装的虚拟空间。该标志
--quiet
不会隐藏最新版本的pip
. 要完全隐藏此警告,您需要使用命令这是通过解释器本身的测试
colorama