Hello Community!
I don’t have experience with Python and am stuck on getting Alteryx Designer to find a package. I’ve been able to use the Google Translate Macro on my laptop without having to run Designer as administrator. On Windows Server 2019 Virtual Machine Alteryx Designer, run as admin, can’t find deep-translate!??!?
I’ve used the following references and can’t seem to find the root cause of this error:
I'm not able to install any package with the Python tool. Using @DavidM 's cona post I wasn’t able to install with conda, but was able to with pip:
(DesignerBaseTools_vEnv) C:\Program Files\Alteryx\bin\Miniconda3\Scripts>pip install deep-translator
Requirement already satisfied: deep-translator in c:\program files\alteryx\bin\miniconda3\lib\site-packages (1.8.3)
Requirement already satisfied: requests<3.0.0,>=2.23.0 in c:\program files\alteryx\bin\miniconda3\lib\site-packages (from deep-translator) (2.28.1)
Requirement already satisfied: beautifulsoup4<5.0.0,>=4.9.1 in c:\program files\alteryx\bin\miniconda3\lib\site-packages (from deep-translator) (4.11.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\program files\alteryx\bin\miniconda3\lib\site-packages (from requests<3.0.0,>=2.23.0->deep-translator) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in c:\program files\alteryx\bin\miniconda3\lib\site-packages (from requests<3.0.0,>=2.23.0->deep-translator) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\program files\alteryx\bin\miniconda3\lib\site-packages (from requests<3.0.0,>=2.23.0->deep-translator) (2022.6.15)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\program files\alteryx\bin\miniconda3\lib\site-packages (from requests<3.0.0,>=2.23.0->deep-translator) (2.0.4)
Requirement already satisfied: soupsieve>1.2 in c:\program files\alteryx\bin\miniconda3\lib\site-packages (from beautifulsoup4<5.0.0,>=4.9.1->deep-translator) (2.3.2.post1)
When I try to run the Google Translate Macro I get 2 errors:
Error 1
Error: Google Auto Translate (88): Tool #1: ---------------------------------------------------------------------------CalledProcessError Traceback (most recent call last)
<ipython-input-1-9766019d1444> in <module>
3 from ayx import Package
4 #Package.installPackages(['pandas','numpy'])
----> 5 Package.installPackages('deep_translator')
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Package.py in installPackages(package, install_type, debug)
200 print(pip_install_result["msg"])
201 if not pip_install_result["success"]:
--> 202 raise pip_install_result["err"]
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Utils.py in runSubprocess(args_list, debug)
118
119 try:
--> 120 result = subprocess.check_output(args_list, stderr=subprocess.STDOUT)
121 if debug:
122 print("[Subprocess success!]")
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
409 kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
410
--> 411 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
412 **kwargs).stdout
413
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
510 retcode = process.poll()
511 if check and retcode:
--> 512 raise CalledProcessError(retcode, process.args,
513 output=stdout, stderr=stderr)
514 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['c:\\program files\\alteryx\\bin\\miniconda3\\envs\\designerbasetools_venv\\python.exe', '-I', '-m', 'pip', 'install', 'deep_translator']' returned non-zero exit status 1.
Error 2
Error: Google Auto Translate (88): Tool #1: ---------------------------------------------------------------------------ModuleNotFoundError Traceback (most recent call last)<ipython-input-2-ce1a2a642a82> in <module> 1 from ayx import Alteryx----> 2 from deep_translator import GoogleTranslator 3 translated = GoogleTranslator(source='auto', target='de').translate("keep it up!") 4 5 data = Alteryx.read("#1")ModuleNotFoundError: No module named 'deep_translator'
Thank you for any guidance on what could be causing the error!