Alteryx Designer Desktop Discussions

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

Issues with Python for Alteryx

ztriano
7 - Meteor

I am trying to run python using the jupiter notebook in alteryx and I wanted to use a function within sklearn and seaborn and I am experiencing issues. I am able to successfuly import sklearn, but when I try to import sequential feature selector, I get an input error. I think alteryx is importing an old version of sklearn and i am not sure how to prompt it to load the newest version 1.0. And i also get an error when loading seaborn. 

 

The procedures i am trying to run are based on this article: Model-based and sequential feature selection — scikit-learn 1.0.1 documentation (I know seaborn is not mentioned in here, but it was an additional problem i was having so thought i would add it to my question)

 

ztriano_0-1640101616690.png

 

ztriano_1-1640101639107.png

 

1 REPLY 1
ConnorK
Alteryx
Alteryx

Hi @ztriano,

 

Here are some resources that may help. 

- To import a specific package version use the following syntax: 

# With a specific version Alteryx.installPackage("logger==1.3")

- To list all packages and their versions use the following syntax:

from ayx import Alteryx import re from pandas import DataFrame import io from contextlib import redirect_stdout  with io.StringIO() as current_output, redirect_stdout(current_output):          Alteryx.installPackages(package='',install_type='freeze')          packages = ( (item for item in out_row.split("=") if item)      for out_row in re.split(string=current_output.getvalue(),pattern=r"\r* ") if out_row)          output_df = DataFrame(packages ,columns=["package","version"])  Alteryx.write(output_df,1)

- These both came from this great article: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Use-Alteryx-installPackages-...

 

I hope this helps!

Connor Kelleher
Senior Sales Engineer
Alteryx
Labels