Answers for "Installing python module from within code"

0

Installing python module from within code

import subprocess
import sys

try:
    import pandas as pd
except ImportError:
    subprocess.check_call([sys.executable, "-m", "pip", "install", 'pandas'])
finally:
    import pandas as pd
Posted by: Guest on March-27-2022

Code answers related to "Installing python module from within code"

Python Answers by Framework

Browse Popular Code Answers by Language