Altair SmartWorks Analytics

 

Installing a Library in a Code Node

A Python library can be installed in a Code node with very few lines of code. For example, to install the NLTK library, simply call a Python subprocess as follows.

 

import subprocess

import sys

subprocess.check_call([sys.executable, "-m", "pip", "install", "nltk"]) # install nltk