mirror of
https://github.com/sipeed/MaixCDK.git
synced 2026-11-09 17:04:38 -06:00
fix yolov5 and classifier load single label model fail bug, and optimize cdk path check script
This commit is contained in:
@@ -15,7 +15,7 @@ def get_sdk_path():
|
||||
|
||||
# 1. get SDK absolute path from MAIXCDK_PATH env
|
||||
try:
|
||||
if os.environ[sdk_env_name] and os.path.exists(os.environ[sdk_env_name]):
|
||||
if os.environ[sdk_env_name]:
|
||||
sdk_path = os.environ[sdk_env_name]
|
||||
except Exception:
|
||||
pass
|
||||
@@ -26,9 +26,14 @@ def get_sdk_path():
|
||||
sdk_path = path
|
||||
|
||||
# 3. check if MaixCDK path valid
|
||||
if not sdk_path or not os.path.exists(sdk_path):
|
||||
if not sdk_path:
|
||||
print("")
|
||||
print("Error: can not find MaixCDK, please set MAIXCDK_PATH env to MaixCDK directory")
|
||||
print("Error: can not find MaixCDK, please set MAIXCDK_PATH env to MaixCDK directory by `export MAIXCDK_PATH=xxxxx`")
|
||||
print("")
|
||||
sys.exit(1)
|
||||
if not os.path.exists(sdk_path):
|
||||
print("")
|
||||
print(f"Error: MaixCDK set to {sdk_path}, but not exists!")
|
||||
print("")
|
||||
sys.exit(1)
|
||||
return os.path.abspath(sdk_path)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
__version__ = "1.2.1"
|
||||
__version__ = "1.2.2"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user