mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-02-19 09:07:02 +08:00
15 lines
322 B
Python
15 lines
322 B
Python
import pip
|
|
|
|
def install(package):
|
|
pip.main(['install', package])
|
|
|
|
def install_requirements(file):
|
|
pip.main(['install', '-r', file, "--upgrade"])
|
|
|
|
def check_dulwich():
|
|
try:
|
|
import dulwich
|
|
return
|
|
except ImportError:
|
|
install('dulwich')
|
|
raise ImportError("Unable to import dulwich") |