ExternalPackageInstall

Install an external language package for use with ExternalEvaluate.

ResourceFunction["ExternalPackageInstall"][language,package]

installs package for external language on your system for use with ExternalEvaluate.

Details and Options

Supported languages include:
"Python"Python package installed via "pip install"
ResourceFunction["ExternalPackageInstall"] returns either a Success or Failure object, depending on the exit code of the external package manager.

Examples

Basic Examples

Install a Python package called “chemlab”:

In[1]:=
ResourceFunction[ "https://www.wolframcloud.com/obj/arnoudb/DeployedResources/Function/\
ExternalPackageInstall"]["Python", "chemlab"]
Out[1]=

Start a Python session:

In[2]:=
session = StartExternalSession["Python"]
Out[2]=

Load the “chemlab” package in Python and obtain information about the bonds in a water molecule:

In[3]:=
bonds = ExternalEvaluate[session, "from chemlab.db import ChemlabDB water = ChemlabDB().get('molecule', 'example.water') water.bonds"]
Out[3]=

View the NumericArray as a normal list:

In[4]:=
Normal[bonds]
Out[4]=

Publisher Information