Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

How to install Python libraries on Alteryx Gallery and give access to local folders

vibes360
8 - Asteroid

Hi,

 

I have a Python code that works perfectly without any errors on my local computer but when I try to save it to the Alteryx Server Gallery to schedule the workflow, I get two errors.

 

First Error - "No module found error" for the libraries that I am using in my code.

I have attached screenshots of the errors as well.

 

Second Error - "System cannot find path specified" which is for one of my local folders. 

 

Please how can I install Python libraries on Alteryx Server Gallery and give Alteryx Gallery access to my local SharePoint I am using locally in my code?

 

 

vibes360_1-1651483861798.png

 

 

 

 

 

 

 

 

vibes360_0-1651483821658.png

 

 

5 REPLIES 5
mbarone
16 - Nebula
16 - Nebula

Hi @vibes360 , for this, you're going to need your Alteryx Server Administrator load those libraries right on the Server itself (they'll have to remote into the server to do this).  And for the local folder error (can't find path), the Server will need the full UNC path (\\server\folder\subfolder\subfolder2\filename.filetype) and have access to that location for it to work.  Unless you only need the server to use a hard copy of the file, in which case when you upload the workflow to the gallery you can send it as an asset like this (however, this will be a hardcopy that the workflow will always reference and it won't change):

2022-04-25 09_09_08-Window.png2022-04-25 09_09_18-Window.png

vibes360
8 - Asteroid

Thank you for your answer. I now have access to the Server/ VM but I don't know where / how to install the libraries. Please can you guide me on how to install the Python libraries and how to give Alteryx Gallery access to the local SharePoint.

Also, I have attached a screenshot of the Alteryx Server VM/ admin.

vibes360_0-1651506042419.png

 

mbarone
16 - Nebula
16 - Nebula

For the libs, just open Alteryx designer, drop the Python tool on it, and remove the # from the appropriate line of code and enter the name of the libs you want:

2022-05-02 11_51_04-alteryxpnv01 - Remote Desktop Connection.png

Here, you'd just remove the # on the Package line of code, and overwrite pandas and numpy with whatever libs you need.  Then click run.  But warning, you may need your admin (or you) to whitelist 'files.pythonhosted.org', 'python.org ', and 'pypi.org '.  That part I don't know how to do (our IT did it).

 

For access to sharepoint, that too is beyond my knowledge and our IT had to do grant access.

vibes360
8 - Asteroid

Hi @mbarone ,

 

Thank you for your reply. I already did the part of removing the # to install the python libraries in designer and Alteryx Gallery is still throwing the same errors. Please could you ask your IT how he whitelisted pypi.org, etc and how he granted access to the Local SharePoint.

 

 

 

 

 

 

mbarone
16 - Nebula
16 - Nebula

Sorry but I cannot ask my IT to give me details on their procedures.  I put a ticket in, and they complete the task without giving details (we're a rather large corporation with several layers between myself and IT; so I can't help you there).

 

As far as the libraries, there are a couple things to check:

 

1.  On the server, in Designer, in a Python tool, run this code:

from ayx import Alteryx
import pandas as pd

pypkglist=!pip list
df=pd.DataFrame(pypkglist)
Alteryx.write(df,5)

 

Check output #5 in the python tool and it will show you which packages you have installed.  If you don't see the ones you think you installed, then they weren't installed.  And if they weren't, you'd have to check for any errors when you installed them (should show you any errors right within the jupyter notebook on the canvas).

 

You should also be able to see the libraries you installed somewhere within C:\Program Files\Alteryx\bin\Miniconda3 on the server (sometimes they put them in different library locations so you'll have to really look).