Alteryx Designer Desktop Discussions

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

Python Package Fails on Windows Server 2019 Virtual Machine

keith-barber
7 - Meteor

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!

5 REPLIES 5
DavidM
Alteryx
Alteryx

Hi @keith-barber,

 

The package or its dependencies not installed properly.

"ModuleNotFoundError: No module named 'deep_translator'"

 

What happened with CONDA end when you tried? Can you expand on that a little please?

Historically with any (relatively) dependencies heavy libraries i had good esxperience with CONDA.

 

dm

David Matyas
Sales Engineer
Alteryx
keith-barber
7 - Meteor

Hi DavidM,

Conda was not able to find the package:

  1. conda config --set ssl_verify no
  2. conda activate DesignerBaseTools_vEnv
  3. conda install -c conda-forge deep-translator

 

 

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

- deep-translator

Current channels:

- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/loopbio/win-64
- https://conda.anaconda.org/loopbio/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

DavidM
Alteryx
Alteryx

That's something that needs to be researched, seems like using CONDA FORGE may help

https://stackoverflow.com/questions/48493505/packagesnotfounderror-the-following-packages-are-not-av...

I would suggest to try to research via google

Does seem to be problem with that package rather than Alteryx from what i can tell :-?

David Matyas
Sales Engineer
Alteryx
keith-barber
7 - Meteor

Thanks David,

 

I wasn't able to make any progress with conda, so I went back to trying pip and was able to install

pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org F:\z_other\Software\Python\deep-translator-1.8.3.tar.gz

 Confirmed installed with pip list.  Now when I try to use the google translate macro I get an different error, SSLError: HTTPSConnectionPool(host='translate.google.com', port=443):, so Designer must be able to find it now?!?!?!  Using Procedure: List the Currently Installed Modules I don't see deep translator and not sure why.  If this is expected I will mark this resolved.

 

 

DavidM
Alteryx
Alteryx

Sorry, @keith-barber, not sure what the problem is, running out of ideas. 

 

I would suggest as a next step you raise this as a ticket with our technical support specialists via https://community.alteryx.com/t5/Support/bd-p/SupportPage

 

cheers

David Matyas
Sales Engineer
Alteryx
Labels