Skip to content

Commit

Permalink
check if system is linux and if c++ compilers are installed
Browse files Browse the repository at this point in the history
  • Loading branch information
abombin committed Sep 3, 2024
1 parent f0d1320 commit 969bcb5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pages2/Pheno_Cluster_a.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
# Import relevant libraries
import streamlit as st
import subprocess
import platform

def is_conda_package_installed(package_name):
try:
output = subprocess.check_output("conda list " + package_name, shell=True)
if package_name in output.decode():
print(package_name + " is installed.")
else:
try:
subprocess.run(f"mamba install -y {package_name}", shell=True)
except:
try:
subprocess.run(f"mamba install -y {package_name}", shell=True)
except:
print("Failed to install " + package_name)

except subprocess.CalledProcessError:
pass

if platform.system() == 'Linux':
is_conda_package_installed(package_name="gcc_linux-64")
is_conda_package_installed(package_name="gxx_linux-64")

try:
import parc
Expand Down

0 comments on commit 969bcb5

Please sign in to comment.