–
import subprocess
def export_package_to_whl(package_name, target_directory):
command = f"pip wheel --wheel-dir={target_directory} {package_name}"
subprocess.call(command, shell=True)
#导出requests包为.whL文件
export_package_to_whl("requests", "path/to/target/directory")
–
–
发表回复