In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Python Package Installation ERRORS and Package Version Conflict

hellyars
13 - Pulsar


I want to add a python package to my Alteryx vEnv.

The specific package is spaCy.

I am following the Alteryx KB article here (Install Python Packages Via Command Prompt) .


I ran into two problems:

1.  A permission issue when trying to update the setuptools wheel
2.  A Pydantic version conflict between Alteryx  sdk and spaCy

 

These are the steps I followed.

 

Activate DesignerBaseTools_venv:

  1. cd "C:\Program Files\Alteryx\bin\Miniconda3\Scripts"
  2. activate DesignerBaseTools_vEnv
  3. cd "C:\Program Files\Alteryx\bin\Miniconda3\envs\DesignerBaseTools_vEnv\Scripts" 
  4. pip install <packagetoinstall

I did modify step #4 to align with recommended spaCy steps to

 

pip install -U pip setuptools wheel
pip install -U spacy

 

 

The first command generated the following error.  A permission issue.  I ran Command Prompt as Administrator.

 

ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\MY_PC\\AppData\\Local\\Temp\\pip-uninstall-b25ufltk\\pip.exe'
Consider using the `--user` option or check the permissions.

 

 

So, I tried just pip install -U spacy.  That produced this error

 

 

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
ayx-python-sdk 1.0.1+build.816027 requires pydantic==1.5.1, but you have pydantic 2.7.1 which is incompatible.
Successfully installed annotated-types-0.6.0 blis-0.7.11 catalogue-2.0.10 cloudpathlib-0.16.0 colorama-0.4.6 confection-0.1.4 cymem-2.0.8 langcodes-3.4.0 language-data-1.2.0 marisa-trie-1.1.0 murmurhash-1.0.10 preshed-3.0.9 pydantic-2.7.1 pydantic-core-2.18.2 smart-open-6.4.0 spacy-3.7.4 spacy-legacy-3.0.12 spacy-loggers-1.0.5 srsly-2.4.8 thinc-8.2.3 tqdm-4.66.2 typing-extensions-4.11.0 wasabi-1.1.2 weasel-0.3.4

 


But, it does appear that spaCy is installed and the Python Tool cam access it.

I rant the following test

 

import spacy
nlp = spacy.load('en_core_web_sm')
doc = nlp("This is a test sentence.")
for token in doc:
    print(token.text, token.pos_)

 

 

It successfully returned

This PRON
is AUX
a DET
test NOUN
sentence NOUN
. PUNCT


But, I assume I could run into problems elsewhere.

 

I assume the solution is to NOT update Alteryx's python packages as this might create other issues?

0 REPLIES 0
Labels
Top Solution Authors