05-13-2021 05:46 AM
This article will review how to install and uninstall Python packages without using the command prompt or the built in installPackages method. This method will also provide better messages if something does error out.
Note that if you want to know how to install/uninstall with either one of the other methods please find articles here:
Prerequisites
Alteryx Designer
Versions: All
In the Python tool create a new cell.
To install from pypi.org rather than a file use this command
!pip install <package name>
To install from a file such as a tar.gz or whl file use this command
!pip install “<file location>”
To install from a text file that is a requirements file
!pip install -r “<file location>”
In the Python tool create a new cell.
To install from pypi.org rather than a file use this command
!pip uninstall -y <package name>
Another way to install/uninstall directly from Alteryx could be:
#To Install Packages from the python tool in Alteryx
from ayx import Package
Package.installPackages(['ffmpeg-python'])
#To Uninstall Packages from the python tool in Alteryx
from ayx import Alteryx
Alteryx.installPackages(package="ffmpeg-python", install_type="uninstall")