We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

How To install/uninstall Python Packages without command prompt or with the built in installPackages method

MatthewP
Alteryx
Alteryx
Created
How To: Install/Uninstall Python Packages without command prompt or with the built in installPackages method

 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

Procedure to Install Packages
  1. In the Python tool create a new cell. 

  2. To install from pypi.org rather than a file use this command

    1. !pip install <package name>

  3. To install from a file such as a tar.gz or whl file use this command

    1. !pip install “<file location>”

  4. To install from a text file that is a requirements file

    1. !pip install -r “<file location>”

Procedure to Uninstall Packages
  1. In the Python tool create a new cell. 

  2. To install from pypi.org rather than a file use this command

    1. !pip uninstall -y <package name>

Comments
JORGE4900
8 - Asteroid

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")