YXI Packaging and Installation

A modified process for packaging and installing Python tools is available to accommodate Python virtual environments and third-party library dependencies.

If your Python tool does not use a virtual environment or third-party libraries, complete the process outlined in Package a Tool.

If your tool uses a virtual environment or third-party libraries, complete the following steps to package your tool and its dependencies.

  1. Verify that you have setup a Python Virtual Environment and Dependencies.
  2. Create a list of the third-party dependencies that are installed with the tool.
    • Run a pip freeze command from the Python virtual environment's \Scripts path.
    • C:\ProgramData\Alteryx\Tools\ExamplePythonSDKTool\Scripts>pip 
      freeze > ..\requirements.txt
    • Verify that the resulting text file only contains libraries that are used in the tool.
  3. Create a temporary working folder.
  4. C:\temp\ExamplePythonSDKTool
  5. Copy all files that will be included in the YXI file, including the requirements file, into the temporary folder.
  6. Copy exclusions

    Do not copy any virtual environment files or folders, including:

    • pyvenv.cfg
    • pip-selfcheck.json
    • \include
    • \Lib
    • \Scripts
  7. Copy the ToolNameConfig.xml file from the tool sub folder to the root of the temporary tool directory.
  8. Rename ToolNameConfig.xml to Config.xml, and open the file.
  9. Verify that the file is configured correctly and that all quotes are removed from the elements.
  10. <Properties>
    	<MetaInfo>
    		<Icon></Icon>
    		<ToolVersion></ToolVersion>
    		<Author></Author>
    		<Name></Name>
    		<CategoryName></CategoryName>
    		<Description></Description>
    		<SearchTags></SearchTags>
    	</MetaInfo>
    </Properties>
  11. Compress the contents of the temporary working folder into a zip file.
  12. Rename the .zip file to a .yxi file.
  13. Verify the conversion by double-clicking on the yxi file. Designer should show a tool installer window for your tool.

To begin the installation process:Verify you have an active internet connection.Double-click the .yxi file.Open Designer and select Open Workflow from the File menu to browse to the .yxi file.If installing as an administrator, the option to install for all users is available.On the tool installer window, click Install to complete the installation process.

Troubleshooting

If you receive an error during the installation process, there may be two issues. First, the files may not exist. Second, you may need to enable Windows long paths.

Follow these steps:

  1. Open the Registry Editor (regedit.exe)
  2. Go to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet\Control\FileSystem
  3. Right click on the key and Export for backup
  4. Change value LongPathsEnabled from 0 to 1
  5. Re-install YXI again. You should not need to restart.

Build your own tool checklist

Create a folder with the name of your tool. See Build Custom Tools.

Create icon and save it inside the tool folder. See Build Custom Tools.

Create a GUI file and save it inside the folder. See HTML GUI SDK.

Create your back end and save it inside the folder. See C++ SDK, Macro, and Python SDK.

Create a configuration file and save it inside the folder. See Tool Configuration File.

Create a package configuration file and save it with the folder. Package a Tool.

Package the package configuration file and tool folder as a yxi. See Package a Tool.