gpt4 book ai didi

python - 删除导入的 python 模块

转载 作者:IT老高 更新时间:2023-10-28 20:27:54 24 4
gpt4 key购买 nike

Possible Duplicate:
Unload a module in Python

导入 Numpy 后,假设我想删除/移除 numpy 导入引用

import sys 
import numpy as np

doMe()
np.something()

#unimport np
#remove numpy from memory

最佳答案

从 Python 中卸载模块 is not supported .

关于python - 删除导入的 python 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8781257/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com