Python Library Not Recognized After Alteryx 2024 Upgrade
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
We recently upgraded our server version to 2024. Since then any Alteryx Workflow that uses a python library is erroring out. For example, for the ones we used 'openpyxl', after the upgrade, the workflow failed stating the following:
Error - ToolId 76: ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[2], line 3
1 import pandas as pd
2 from ayx import Alteryx
----> 3 from openpyxl import load_workbook
5 # Read input data from Alteryx (Dynamic output paths, sheet names, and cell locations)
6 df = Alteryx.read("#1") # Assuming first input contains data
ModuleNotFoundError: No module named 'openpyxl'
But this workflow was working fine with 2023 version. We confirmed that the python version in our server is 3.12 which is higher than what 2024 version needs. Wanted to see if anyone has ideas on what the issue could be? I can also confirm that 'openpyxl' is present in our server.
- Labels:
-
Python
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
2024.1 and 2024.2 have python 3.10 installed for the standard python tool (jupyter ui). https://help.alteryx.com/release-notes/en/version-support-policy/alteryx-embedded-python.html#overvi...
Each time designer installs, it will overwrite the DesignerBaseTools_vEnv, which includes removing packages that were installed by the user. To reinstall the openpyxl library, open the python tool and in one of cells run:
from ayx import Package
Package.installPackages(['openpyxl'])
Multiple packages can be passed through the array. This will install the package(s) from pip into the base virtual environment for use in the python tool.
Note: to install packages for all users on a machine, open an instance of designer as admin and then run the command above.
