Just found this thread while dealing with the same problem on mac with python 3.9.13. My suggested fix is to replace Popen by run command, as suggested by subprocess docs, with check=True to fail if the command fails. stderr is pipe into stdout and both printed so that warning messages are still visible:
diff --git a/conanfile.py b/conanfile.py
index 39899be50..150cd23c6 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -305,13 +305,8 @@ class BasiliskConan(ConanFile):
if not is_running_virtual_env() and self.options.autoKey != 's':
add_basilisk_module_command.append("--user")
- process = subprocess.Popen(add_basilisk_module_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- output, err = process.communicate()
- if err:
- print("Error %s while running %s" % (err.decode(), add_basilisk_module_command))
- sys.exit(1)
- else:
- print("This resulted in the output: \n%s" % output.decode())
+ completed_process = subprocess.run(add_basilisk_module_command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)
+ print("This resulted in the output: \n%s" % completed_process.stdout.decode())
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Configure the Basilisk framework.")