Start Free Trial

Alteryx Designer Desktop Discussions

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

Importing NLTK in python tool

sidneyjacobs
7 - Meteor

Dear community,

 

when I try to import nltk though the python jupyter notebook, it does not seem to work. According to previous posts here I should simply use the command Alteryx.installPackages("nltk"), but this gives the error

 

CalledProcessError: Command '['c:\\program files\\alteryx\\bin\\miniconda3\\pythontool_venv\\scripts\\python.exe', '-m', 'pip', 'install', 'nltk']' returned non-zero exit status 1.

 

Do I have to add a command tool in alteryx to run the alternative install given on the nltk website? This would simply run the following line:

python -m nltk.downloader all

 

any help is appreciated.

 

Sidney Jacobs

2 REPLIES 2
PaulN
Alteryx Alumni (Retired)

Hi @sidneyjacobs,

 

To install new libraries for Python tool with Alteryx Designer admin, one needs to start Designer as Administrator (see https://help.alteryx.com/current/Python.htm for reference)

This is due to the reason of location of the packages (C:\Program Files\Alteryx\bin\Miniconda3\PythonTool_venv\Lib\site-packages).

 

 

To elaborate on this message, if I try on my own machine I can see the following:

 

From Jupyter:

 

python_tool_admin_error.png

 

If I run the workflow:

 

python_tool_admin_error_2.png

 

 

Thanks,

 

Paul Noirel

Sr Customer Support Engineer, Alteryx

sidneyjacobs
7 - Meteor

Thank you very much!

I figured I was already running it as admin, but due to the way our drives are set up this was not the case. Worked like a charm once I moved it to the correct drive.

 

Sidney

Labels
Top Solution Authors