Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Python in Alteryx - Plotly package installed yet not recognizing Express or Graph Objects

Gelly
7 - Meteor

Hello all, 

 

I would appreciate any help - if anyone has tried using python in Alteryx.

I do not understand why am I getting an error saying ModuleNotFoundError when Plotly package is already installed perfectly in Alteryx python tool. 

 

My understanding is  "Plotly Express as well as Graph Objects are a built-in part of the plotly library" and should work just after installing plotly.  

https://plotly.com/python/plotly-express/#:~:text=Plotly%20Express%20is%20a%20built,plotly.graph_obj....

 

Am I missing something here?  (Please find the picture attached below) 

 

I am installing the following: 

Install.PNG

I also tried: 

Package.installPackages("plotly") and it worked yet the same following error. 

 

But when I import the following I get error on express as well as Graph Objects:

Import.PNG

ModuleNotFoundError: No module named 'plotly.graph_objects'
ModuleNotFoundError: No module named 'plotly.express'

 

 

Additionally: 

I have a huge processing and I wanted to add the graphs in the workflow itself. I have a working python code and wanted to enrich my Alteryx workflow with it. (I am using plotly as I have way more chart manipulation capabilities and Alteryx charting is restrictive in comparison to plotly)

4 REPLIES 4
OTrieger
14 - Magnetar

@Gelly 
Are you running Alteryx as Administrator?

In order to install the package you need to have administrator rights.

Gelly
7 - Meteor

@OTrieger 

 

Thanks for your response. No. I am not running as an Administrator. 

But it seems like the corporation Admin or Alteryx package already has plotly installed because when I try the following:

 

import plotly

 

I do not get any error. That's why I am getting confused. If plotly works then why not plotly.express or plotly.graph_objects. 

apathetichell
20 - Arcturus

try:

help(plotly)

 

the version of Plotly on Alteryx 2021.4 (ie 3.8) - has plotly.graph_objs - which is readily importable. It does not have plotly.express

 

you can try something like: Package.installPackages(['plotly.express']) -> or upgrading your version of plotly - but Alteryx won't be happy.

Gelly
7 - Meteor

Thanks @apathetichell 

I understand now! Thank you for your help. Appreciate it! 

Labels
Top Solution Authors