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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE

Module Not Found Using Python SDK in Alteryx Designer

Atom

Hi Everyone,

 

I am currently working on a tool using the Python SDK. My tool necessitates the use of the win32 python API, specifically win32wnet. Upon running the tool, all the modules I installed using pip and the requirements.txt file installed correctly (xlrd, pandas). However, for win32wnet in Alteryx designer I receive:

 ModuleNotFoundError: No module named 'win32wnet'

The strange part is, when I open the python shell from the tools virtual environment in the command prompt the win32wnet module imports correctly.

image.png

 

 

I have tried 3 different methods of installing the win32 package. I have used the requirements.txt file to install pywin32 and pypiwin32. I alsomanually installed the binary of the win32 api to the tools virtual python environment using the command prompt:

 

 

>easy_install.exe https://github.com/mhammond/pywin32/releases/download/b224/pywin32-224.win-amd64-py3.6.exe

 

 

Error importing module in Designer

image.png

 

 

I am working with the admin installation of Alteryx Designer 2018.4

 

Any help is greatly appreciated!!

Alteryx
Alteryx

@dering,

 

The issue is with how the path to python .egg library settings.  When you run Python.exe directly it will grab a file easy-install.pth that will append .egg library paths to sys.path for you.  Because the Python SDK uses an embedded Python interpreter, it does not directly setup any Python .egg library paths for you.  As the author of the Python SDK tool, you will need to append any paths to Python .egg libraries within your .py file, as shown below.

 

import sys, os
import AlteryxPythonSDK as Sdk

sys.path.append(os.path.join(os.path.dirname(__file__), "lib\\site-packages\\pywin32-224-py3.6-win-amd64.egg"))
import win32wnet

 

This should fix the import module not found issue.  Please let me know if you are still having issues.

 

Thanks

Hi, 

 

I'm facing a similar issue. I updated the Alteryx Designer and when trying to run my old workflows, I got "Module Not found" error for the python packages that i have used in the workflow. I tried to reinstall the package in the new path for the pythontool_env. But the error is still there.

 

I also tried installing it from the Jupyter notebooks from the designer, towards the end i get Permission Denied error. Please provide the solution for this. I have Non.Admin version of the designer and everything was working fine with the previous version of the designer (2018.4.5).

 

Attached are the error messages. 

 

 

Labels