Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Installing #python #module #code
ADD COMMENT
Topic
Name
5+6 =