最後活躍 10 months ago

這段程式碼用於檢查 Python 環境中是否安裝了 numpy 模組。 如果 numpy 已安裝,則輸出 "numpy is installed",否則輸出 "numpy is not installed"。

timmy 已修改 10 months ago. 還原成這個修訂版本

沒有任何變更

timmy 已修改 10 months ago. 還原成這個修訂版本

1 file changed, 6 insertions

check_numpy_installed.py(檔案已創建)

@@ -0,0 +1,6 @@
1 + from importlib.util import find_spec
2 +
3 + if find_spec("numpy") is not None:
4 + print("numpy is installed")
5 + else:
6 + print("numpy is not installed")
上一頁 下一頁