@@ -52,34 +52,9 @@ def is_package_version_on_pypi(package_name, version=None):
52
52
sys .stderr .flush ()
53
53
return False
54
54
55
-
56
- # package = "evo"
57
- # version = "1.31.1"9
58
-
59
- # if is_package_version_on_pypi(package, version):
60
- # subprocess.check_call([sys.executable, "-m", "pip", "install", f"{package}=={version}"])
61
-
62
- def force_install (package ):
63
- try :
64
- subprocess .run ([sys .executable ,"-m" ,"pip" ,"install" ,"--disable-pip-version-check" ,"--ignore-requires-python" ,package ])
65
- except subprocess .CalledProcessError as e :
66
- print (f"Error occurred while installing { package } : { e .stderr } " )
67
- sys .stderr .flush ()
68
- except FileNotFoundError :
69
- print ("Error: Pip is not found. make sure you have pip installed." )
70
- sys .stderr .flush ()
71
- except PermissionError :
72
- print ("Error: Permission denied. " )
73
- sys .stderr .flush ()
74
-
75
-
76
-
77
-
78
55
def install (package ):
79
56
# Install a pip python package
80
57
81
- # Args:
82
- # package ([str]): Package name with version
83
58
try :
84
59
subprocess .run ([sys .executable ,"-m" ,"pip" ,"install" ,"--disable-pip-version-check" ,package ])
85
60
except subprocess .CalledProcessError as e :
@@ -92,29 +67,11 @@ def install(package):
92
67
print ("Error: Permission denied. " )
93
68
sys .stderr .flush ()
94
69
95
-
96
-
97
- # def install(package):
98
- # # try:
99
- # subprocess.check_call([sys.executable, "-m", "pip", "install", package])
100
- # # except subprocess.CalledProcessError as e:
101
- # # print(f"❌ Failed to install {package}: {e}")
102
-
103
70
# Install standard dependencies
104
- is_package_version_on_pypi ("numpy" )
105
- install ("numpy" )
106
- # is_package_version_on_pypi("evo")
107
- # install("evo")
108
- # is_package_version_on_pypi("scipy", "1.10.1")
109
- install ("scipy" )
110
- install ("matplotlib" )
111
- install ("pyyaml" )
112
- is_package_version_on_pypi ("tqdm" )
113
- install ("tqdm" )
114
71
install ("argcomplete" )
115
72
install ("colorama" )
116
73
install ("pillow" )
117
- install ("pykitti" ) # Might install additional light deps
74
+ # install("pykitti") # Might install additional light deps
118
75
# install("rosbags")
119
76
# is_package_version_on_pypi("natsort")
120
77
install ("natsort" )
@@ -126,11 +83,7 @@ def install(package):
126
83
evo_wheel_path = os .path .join (this_dir , "deps" , "evo-1.31.1-py3-none-any.whl" )
127
84
128
85
# # try:
129
- subprocess .check_call ([sys .executable , "-m" , "pip" , "install" , "--no-deps" , "--ignore-requires-python" , evo_wheel_path ])
130
-
131
- import evo as afterfunc
132
- print ("evo version:" , afterfunc .__version__ )
133
- sys .stdout .flush ()
86
+ subprocess .check_call ([sys .executable , "-m" , "pip" , "install" , "--no-deps" ,"--disable-pip-version-check" , "--ignore-requires-python" , evo_wheel_path ])
134
87
135
88
from evo import __version__
136
89
@@ -153,23 +106,16 @@ def version_to_tuple(version):
153
106
f"Evo version { __version__ } is less than the required version { '.' .join (map (str , required_version_tuple ))} . Point_distances not supported."
154
107
)
155
108
else :
156
- print (f"\033 [92mEvo version { __version__ } meets the required version.\033 [0m " )
109
+ print (f"✅ Evo version { __version__ } meets the required version." )
157
110
sys .stdout .flush ()
158
111
159
112
160
113
from evo .core import sync
161
114
from evo .core .trajectory import PoseTrajectory3D
162
115
from evo .core .trajectory import Plane
163
116
from evo .core .metrics import PoseRelation , Unit
164
- # from evo.tools import file_interface
165
- # import evo.main_ape as main_ape
166
- # import evo.main_rpe as main_rpe
167
117
168
- # print("✅ evo is installed and available.")
169
- # except subprocess.CalledProcessError as e:
170
- # print(f"❌ Failed to install evo wheel: {e}")
171
- # except ImportError as e:
172
- # print(f"❌ Failed to import evo after install: {e}")
118
+ print ("✅ evo is installed and available." )
119
+ sys .stdout .flush ()
173
120
174
- #
175
121
from .main import evaluate
0 commit comments