mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-04 16:22:57 +08:00
This reverts commit d1d063e4af
.
This commit is contained in:
@@ -27,7 +27,6 @@ import sys
|
||||
import tarfile
|
||||
import time
|
||||
from datetime import datetime
|
||||
from importlib.metadata import PackageNotFoundError, distribution
|
||||
from logging.handlers import BaseRotatingHandler
|
||||
from pathlib import Path
|
||||
from typing import Literal, TypeVar, Union
|
||||
@@ -669,14 +668,6 @@ def import_from_path(module_name: str, file_path: Union[str, os.PathLike]):
|
||||
return module
|
||||
|
||||
|
||||
def is_package_installed(package_name):
|
||||
try:
|
||||
distribution(package_name)
|
||||
return True
|
||||
except PackageNotFoundError:
|
||||
return False
|
||||
|
||||
|
||||
def version():
|
||||
"""
|
||||
Prints the contents of the version.txt file located in the parent directory of this script.
|
||||
|
Reference in New Issue
Block a user