community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

How to reset the Python tool

Moderator
Moderator
Created on

After installing a bunch of amazing Python libraries to use in your Python tool, are you seeing strange errors in your notebook, no matter what you try to do? To resolve these errors, your first idea might be to reinstall Designer completely. In this article, I would like to suggest 2 other options; restoring the Python libraries to their state following the installation, and resetting the Python tool completely.

 

Good to know:

 

Alteryx Designer installations include a file with copies of Python wheel files to reinstall the default python libraries if needed, which by default is located inf folder:

 

  • %ALTERYX_DIRECTORY%\bin\Miniconda3\PythonTool_Config\wheels (ex: C:\Program Files\Alteryx\bin\Miniconda3\PythonTool_Config\wheels) for 2018.3 - 2019.1
  • %ALTERYX_DIRECTORY%\bin\Miniconda3\Common_Config\wheels (ex: C:\Program Files\Alteryx\bin\Miniconda3\Common_Config\wheels) for 2019.2

 

This means that internet access is not required to reinstall the libraries!

 

The Python tool is installed in its own virtual Python environment, PythonTool_venv (default location: %ALTERYX_DIRECTORY%\bin\Miniconda3\PythonTool_venv). Because of this, libraries that have been installed for Python tool will not be available to other Python tools or instances of Python installed on the same machine. 

 

 

How to Reinstall one library and its dependencies:

 

Warning: The following steps may break dependencies for any additional libraries you've installed for your Python tool.

 

Steps:

 

1. Stop Alteryx Designer.

 

2. Open a command prompt (run the command prompt as an Administrator for an admin version of Designer or Server).

 

3. In the command prompt, navigate to the Alteryx Python folder.

 

For admin (default location of the folder):

 

cd "C:\Program Files\Alteryx\bin\Miniconda3\PythonTool_venv\Scripts"

 

For non-admin (default location of the folder)

 

cd "C:\Users\%USERNAME%\AppData\Local\Alteryx\bin\Miniconda3\PythonTool_venv\Scripts"

 

4. Run a command to reinstall the library you need (in following examples we chose matplotlib). Note that dependencies will be reinstalled as well:

 

For 2018.3 - 2019.1:
 
pip.exe install --no-index --find-links="..\..\PythonTool_Config\wheels" matplotlib --upgrade --force-reinstall
 
For 2019.2+:
 
pip.exe install --no-index --find-links="..\..\Common_Config\wheels" matplotlib --upgrade --force-reinstall

 

5. Wait until process is completed.

 

6. You can now close the command prompt and have fun with the Python tool again!

 

How to Reset your Python tool:

 

Warning: this will remove any libraries that you have installed, and restore the tool to its default libraries. 

 

 

1. Stop Alteryx Designer.

 

2. Open a command prompt (run the command prompt as an Administrator for an admin version of Designer or Server).

 

3. In the command prompt, navigate to the Alteryx Python folder.

 

For admin (default location of the folder):

 

cd "C:\Program Files\Alteryx\bin\Miniconda3"

 

For non-admin (default location of the folder)

 

cd "C:\Users\%USERNAME%\AppData\Local\Alteryx\bin\Miniconda3"

 

4. Run the following command to recreate the Python virtual environment:

 

rmdir /Q /S PythonTool_venv
python -m venv PythonTool_venv

 

5. Install your libraries:

 

For 2018.3 - 2019.1:
 
cd PythonTool_venv\Scripts
pip.exe install --no-index --find-links="..\..\PythonTool_Config\wheels" -r ..\..\PythonTool_Config\requirements.txt
 

For 2019.2+:

 

cd PythonTool_venv\Scripts
pip.exe install --no-index --find-links="..\..\Common_Config\wheels" -r ..\..\Common_Config\requirements-python-tool.txt
  
6. Wait until process is completed.
 
7. You can now close the command prompt and have fun with the Python tool again!
 
 
This process will reset Python tool to its original state!
 
Should you continue to have issues with your Python tool after attempting these processes, a full reinstallation of Alteryx Designer (or Server) may be your next best option.