Hi
I have recently upgraded Alteryx to 2024.2.1.73 Patch 2. After I have done so, I could not use the "Python" tool under "Developer". Specifically, I can run without problem for the following script
"from ayx import Package"
However, when I run "from ayx import Alteryx", it gives me the following error. Can you help to give me some idea how to resolve this? thanks
ImportError Traceback (most recent call last) Cell In[5], line 1 ----> 1 from ayx import Alteryx File c:\users\terencechan1\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Alteryx.py:17 1 # Copyright (C) 2018-2019 Alteryx, Inc. All rights reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); you may (...) 12 # License for the specific language governing permissions and limitations 13 # under the License. 14 """Import public functions 15 """ ---> 17 from ayx.export import ( 18 __version__, 19 help, 20 read, 21 write, 22 readMetadata, 23 getIncomingConnectionNames, 24 installPackage, 25 installPackages, 26 importPythonModule, 27 getWorkflowConstant, 28 getWorkflowConstants, 29 getWorkflowConstantNames, 30 ) 32 ### the reason for this file is so that the imported modules in ayx.export 33 ### are not left as module attributes for dir(module) or jupyter's intellisense 35 version = __version__ File c:\users\terencechan1\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\export.py:17 1 # Copyright (C) 2018-2019 Alteryx, Inc. All rights reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); you may (...) 12 # License for the specific language governing permissions and limitations 13 # under the License. 14 """Pull together all public functions 15 """ ---> 17 from ayx.CachedData import CachedData as __CachedData__ 18 from ayx.Help import Help as __Help__ 19 from ayx.Package import installPackages as __installPackages__ File c:\users\terencechan1\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\CachedData.py:18 14 """Interact with data cached by the Python tool after executing the workflow. 15 """ 17 from uuid import uuid1 ---> 18 import pandas as pd 19 from ayx.DatastreamUtils import MetadataTools, Config 20 from ayx.Datafiles import Datafile File c:\users\terencechan1\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\pandas\__init__.py:32 29 _missing_dependencies.append(f"{_dependency}: {_e}") 31 if _missing_dependencies: # pragma: no cover ---> 32 raise ImportError( 33 "Unable to import required dependencies:\n" + "\n".join(_missing_dependencies) 34 ) 35 del _hard_dependencies, _dependency, _missing_dependencies 37 try: 38 # numpy compat ImportError: Unable to import required dependencies: numpy: cannot import name 'TooHardError' from 'numpy.core._exceptions' (C:\Users\terencechan1\AppData\Roaming\Python\Python310\site-packages\numpy\core\_exceptions.py)
Solved! Go to Solution.
You could try it through AI to debug your code better.
Thanks Calvin.
I tried to run "pip show numpy" in the terminal. I got the following error:
pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pip show numpy
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Seems like I need to go to the right path. Do you know which path I should go to?
Hi @tsnchan ,
In addition to @caltang , when you install packages on Python Tool, please make sure to run Desinger as Administrator.
... or you may try the workaround as discussed in the page Python Packages in Alteryx: No Admin, No Problem (Thank you @Felipe_Ribeir0 !)
Thanks. Does it mean I have to install the "Admin" version of the installation package? Currently I installed the non-admin version
No - just run Alteyrx as admin (right click when launching - run as admin). This gives it admin persmissions to manage/install python packages.
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |