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.

YXI - Understanding the installation process for Python-based tools

PaulN
Alteryx Alumni (Retired)
Created

Question

With the introduction of Python SDK, Alteryx Designersupports the installation of YXI files for Python-based tools. What happens during the installation process for one of these tools?

Answer

Note:The following is based on 2018.4. Each command is assumed to be prefixed with %ALTERYXDIR%\bin\Miniconda3\python.exe.

Example: C:\Program Files\Alteryx\bin\Miniconda3\python.exe -m venv c:\temp\my_tool

General Process after running a YXI file

1. The contents of the YXI fileare uncompressed(unzipped) in%DESTINATION_PATH%(seeTools Location). Please note thatmultiple tools could be installed with a single YXI.

2.A Python environment is created for the tool.

-m venv %DESTINATION_PATH%

Note: Following this step, the tool folder shouldhave the following structure:

python_default_structure.png

If any of these components are missing, the tool is not installed correctly.

3.pip (the Python package manager) is upgraded in the Python environment.

-m pip install --upgrade pip

4.setuptools(a library for Python package support)is upgraded in the Python environment.

-m pip install --upgrade setuptools

5.Any tool dependencies are installed in the Python environment.

-m pip install --disable-pip-version-check -r requirements.txt --log PythonDependencyInstall.log

Errors and Cancellation

Tool folder will be deleted if:

  • user cancels the installation
  • an error occurs and user click on OK

Logs

FilePythonDependencyInstall.log contains the logs for tool installation

Tool Location:

By default, tools are installed under:

%APPDATA%\Alteryx\Tools (ex: C:\users\My_Account\AppData\Roaming\Alteryx\Tools) for current user

%PROGRAMDATA%\Alteryx\Tools (ex: C:\ProgramData\Alteryx\Tools) for all users

Example of use case:

Following is only provided as an example.Should you face an error during the installation of one of the tools, please contact Alteryx Customer Support (support@alteryx.com).

Spoiler (Highlight to read)

Imagine that want to investigate the following error message during the installation ofazure_data_lake_input_v1.0.2.yxi.

AzureDataLakeInstallError.png

Asthe installation window only returns the last error message, you may need to dig further.

Byproceeding with a manual installation, you can obtain more details.


The process is as follows:

1. Renameazure_data_lake_v1.0.2.yxi toazure_data_lake_v1.0.2.zip and uncompress folderazure_data_lake_input_v1.0.2to C:\users\%Your_Account%\AppData\Roaming\Alteryx\Tools\azure_data_lake_input_v1.0.2 (%Your_Account% should match your Windows login)

2. Open a command prompt (cmd.exe)

3.Create the Python environment for the tool (based on default path):

C:\Program Files\Alteryx\bin\Miniconda3\python.exe -m venv C:\users\%Your_Account%\AppData\Roaming\Alteryx\Tools\azure_data_lake_input_v1.0.2


4.Change to tool folder and proceed with package updates and dependency installations:

cd C:\users\%Your_Account%\AppData\Roaming\Alteryx\Tools\azure_data_lake_input_v1.0.2
Scripts\python.exe -m pip install --upgrade pip Scripts\python.exe -m pip install --upgrade setuptools Scripts\python.exe -m pip install --disable-pip-version-check -r requirements.txt --log PythonDependencyInstall.log


In this particular example your trace showed the following error:

azure_error.png


This message indicates there was a problem confirming the SSL certificate from pypi. It is a clue regarding the cause of the issue and its solution.

This specific issue can be fixed with the following steps:

  1. Create Filepip.ini(case is important) under%APPDATA%\pip(exampleC:\Users\my_account\AppData\Roaming\pipwheremy_accountis the Windows login).
    pipfolder will have to be created if it does not already exist.

  2. Openpip.iniand add the following content:
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org

3. Install tool again

Imagine that want to investigate the following error message during the installation ofazure_data_lake_input_v1.0.2.yxi. Asthe installation window only returns the last error message, you may need to dig further. Byproceeding with a manual installation, you can obtain more details. The process is as follows: 1. Renameazure_data_lake_v1.0.2.yxi toazure_data_lake_v1.0.2.zip and uncompress folderazure_data_lake_input_v1.0.2to C:\users\%Your_Account%\AppData\Roaming\Alteryx\Tools\azure_data_lake_input_v1.0.2 (%Your_Account% should match your Windows login) 2. Open a command prompt (cmd.exe) 3.Create the Python environment for the tool (based on default path): C:\Program Files\Alteryx\bin\Miniconda3\python.exe -m venv C:\users\%Your_Account%\AppData\Roaming\Alteryx\Tools\azure_data_lake_input_v1.0.2 4.Change to tool folder and proceed with package updates and dependency installations: cd C:\users\%Your_Account%\AppData\Roaming\Alteryx\Tools\azure_data_lake_input_v1.0.2Scripts\python.exe -m pip install --upgrade pip Scripts\python.exe -m pip install --upgrade setuptools Scripts\python.exe -m pip install --disable-pip-version-check -r requirements.txt --log PythonDependencyInstall.log In this particular example your trace showed the following error: This message indicates there was a problem confirming the SSL certificate from pypi. It is a clue regarding the cause of the issue and its solution. This specific issue can be fixed with the following steps: Create Filepip.ini(case is important) under%APPDATA%\pip(exampleC:\Users\my_account\AppData\Roaming\pipwheremy_accountis the Windows login).pipfolder will have to be created if it does not already exist. Openpip.iniand add the following content: [global]trusted-host = pypi.python.org pypi.org files.pythonhosted.org 3. Install tool again

Comments
sathiya
8 - Asteroid
Nice post Question - 1. If i encounter issue after installing ex - not able to view the icon on the toolbar how troubleshoot - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Salesforce-Input-V4-0-0-alteryx-2018-3... 2. If i use yxmc tool - i can insert with right click insert macro - does Python tools will have the ability ?
PaulN
Alteryx Alumni (Retired)

Hi @sathiya,

 

Thank you for your message and happy new year.

 

The article is specific to the installation process and therefore does not cover your 2 questions. I can see that your first point is already in progress with a Customer Support Engineer. Any tools installed with Alteryx will be available via right click.

 

Kind regards,

 

Paul Noirel

Sr Customer Support Engineer, Alteryx

 

 

 

cam_w
11 - Bolide

@PaulN -

Is the last line of #4 meant to read "pip.exe" instead of "python.exe"? Or possibly missing "-m pip"?

 

 

 

PaulN
Alteryx Alumni (Retired)

Good catch @cam_w!

 

I have amended the post.

 

Thanks again!!

 

Paul Noirel

Sr Customer Support Engineer, Alteryx

EdwardNSG
5 - Atom

Hi,

 

I am having this same issue as described in the post (for the google big query connector not azure). However, I have tried the solution and it is still giving the same error. Any idea what else I can try?

Many thanks,

Ed

PaulN
Alteryx Alumni (Retired)

Hi @EdwardNSG,

 

Thank you for posting!

 

Could you please post a screenshot of your pip.ini file and of the error on the command line please?

 

Thanks,

 

PaulN

 

EdwardNSG
5 - Atom
Hi Paul,

It was my company firewall. I contacted support and they provided me with offline versions to download so its all working now. Thank you though.

Regards,

Ed

http://www.nsg.com/disclaimer
PeterA1
Alteryx
Alteryx

 

PeterA1_0-1575839781409.png

 

My thinking is this has something to do with a firewall. Do you know where I can find an offline connector?