We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6138a2f commit 28ea56aCopy full SHA for 28ea56a
pipwizard.py
@@ -0,0 +1,12 @@
1
+import importlib
2
+import subprocess
3
+
4
+def install_lib (pkg):
5
+ try:
6
+ importlib.import_module(pkg)
7
+ print(f"{pkg} is already installed")
8
+ except ImportError:
9
+ subprocess.check_call(["pip", "install", pkg])
10
+ print(f"{pkg} had been installed.")
11
12
+install_lib("pyperclip")
0 commit comments