Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop 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")

 

BretCarr
10 - Fireball

@JORGE4900 Worked like a charm. Thank you!

 

Strange how it isn't in the Aleryx.help().