Alteryx Designer Desktop Discussions

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

Error on importing ayx.Alteryx in Python tool

NikCP
6 - Meteoroid

Hi.

 

Recently upgraded to 2022.1. Got a fresh install of the DesignerBaseTools_vEnv. I've only installed pyarrow, fastparquet and snowflake-snowpark-python[pandas] via conda since install.

 

On running 

 

 

from ayx import Alteryx

 

 

I get the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-f63ba0b8339f> in <module>
----> 1 from ayx import Alteryx
      2 
      3 import numpy as np
      4 
      5 import pandas as pd

c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Alteryx.py in <module>
     15 """
     16 
---> 17 from ayx.export import (     18     __version__,
     19     help,

c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\export.py in <module>
     15 """
     16 
---> 17 from ayx.CachedData import CachedData as __CachedData__
     18 from ayx.Help import Help as __Help__
     19 from ayx.Package import installPackages as __installPackages__

c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\CachedData.py in <module>
     17 from uuid import uuid1
     18 import pandas as pd
---> 19 from ayx.DatastreamUtils import MetadataTools, Config
     20 from ayx.Datafiles import Datafile
     21 from ayx.DataUtils import getPandasDatetimeUnits, firstValidValue

c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\DatastreamUtils.py in <module>
     21 from functools import reduce
     22 from ayx.helpers import convertObjToStr, fileExists, isDictMappingStrToStr
---> 23 from ayx.Compiled import pyxdb
     24 
     25 

c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Compiled.py in <module>
     20 """
     21 
---> 22 import PyYXDBReader as pyxdb
     23 
     24 

ImportError: DLL load failed while importing PyYXDBReader: The specified procedure could not be found.

Unsure of how to proceed.  Thanks in advance.

6 REPLIES 6
acarter881
12 - Quasar

This may be unrelated, but when you use third party libraries that are NOT installed by default (i.e., libraries such as tqdm, requests, etc.), are you running Designer as an Administrator? If not, try that. I found that I wasn't able to use third party libraries in the Python tool (i.e., the virtual environment for Python) unless I ran Designer as an admin.

NikCP
6 - Meteoroid

Hi.

 

Opened the Admin version as admin, same issue.

Interestingly, could only access the C drive when opened as admin?

Felipe_Ribeir0
16 - Nebula

I dont know if it would work, but i would try to update the library

 

from ayx import Package

Package.installPackages(package='ayx',install_type='install --upgrade')

NikCP
6 - Meteoroid

Thanks, Felipe.

 

I had the latest ayx, so it would install another version.

NikCP
6 - Meteoroid

I reset the environment and used pip instead of conda to install my libraries. It threw up a bunch of dependency issues  but, unlike conda,  pip actually told me about them so I was able to get them resolved.

 

Thanks for your help, guys!

pchong
8 - Asteroid

Hi @NikCP ,

I am having the same issue, ImportError with a different error message.

I was wondering if they are the same issue.
Can you please elaborate on the solution?

Much appreciated!

 

Labels
Top Solution Authors