Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docplex/util/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_cplex_info():
# way of unloading the 'cplex' module and since we will copy
# a new shared object over the already loaded one, leaving the
# cplex module loaded can create a segmentation fault.
out = subprocess.run(["python", "-c", sub_program], capture_output=True)
out = subprocess.run([sys.executable, "-c", sub_program], capture_output=True)
if out.returncode == 0:
stdout = out.stdout.decode("utf-8").strip().split(" ")
if stdout[0] != "Error:":
Expand All @@ -78,6 +78,10 @@ def copy_so(cos):
cos = os.path.realpath(cos)
pcplex, version = get_cplex_info()

if version is None:
print("ERROR: did not find 'cplex' package")
return

version_mneumonic = "".join(version.split(".")[:3])
so_name = get_so_name(version_mneumonic)
cpo_name = get_cpo_name(version_mneumonic)
Expand Down