Skip to content

Commit

Permalink
Merge branch 'main' of https://gitee.com/li-yihao0328/nc_bot
Browse files Browse the repository at this point in the history
  • Loading branch information
liyihao1110 committed Feb 18, 2025
2 parents c997371 + c287ad2 commit 974c61e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ncatbot/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.1.2"
__version__ = "3.1.3"
7 changes: 2 additions & 5 deletions ncatbot/utils/check_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ def get_local_package_version(package_name):
:return: 本地版本(字符串)或 None(如果包未安装)
"""
try:
# 获取当前环境的pip路径
pip_path = os.path.join(os.path.dirname(sys.executable), "pip")

# 通过 subprocess 调用当前虚拟环境中的 pip show 命令来获取包的版本
# 改用 python -m pip
result = subprocess.run(
[pip_path, "show", package_name],
[sys.executable, "-m", "pip", "show", package_name],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
Expand Down

0 comments on commit 974c61e

Please sign in to comment.