We’ve extended Inspire Early Bird Pricing until March 1. Register now and enjoy 20% off conference passes and 10% off training passes. P.S. Don’t forget to bring friends! When you sign up for five or more tickets, you get an extra 20% discount on conference passes. Learn more now.

Alteryx Designer Desktop Discussions

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

Python Tool Error - ModuleNotFoundError: No module named 'selenium'

gavinott1
6 - Meteoroid

Hi, I have a workflow that uses the Python tool and it has ran perfectly in the past, but I'm now getting the following error:

 

ModuleNotFoundError: No module named 'selenium'

I checked, and I still have Selenium installed and up to date, and I can also still run Selenium from Python command line, so I'm not sure why Alteryx can't find it.

 

I haven't made any changes to my workflow, but I did just update to Alteryx Designer 2020.1.5.  Could this be causing the problem?

 

Thank you!

 

Gavin

5 REPLIES 5
AndrewKramer
Alteryx Alumni (Retired)

You'll need to make sure the package is installed in the Virtual Environment that the Python Tool uses. this is rebuilt when you reinstall Alteryx.

 

If Admin Version of Designer:

C:/Program Files/Alteryx/bin/Miniconda3/envs/JupyterTool_vEnv

 

You can use Package.installPackages() in Designer to install the package

gavinott1
6 - Meteoroid

Hi Andrew,

 

Thank you for helping me earlier.  I'm now running into a similar problem after I updated Alteryx.  I try to reinstall selenium in Alteryx but I get the following error:

 

ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\alteryx\\bin\\miniconda3\\envs\\jupytertool_venv\\Lib\\site-packages\\selenium'
Consider using the `--user` option or check the permissions.

 

Here's the full output:

Collecting selenium
  Using cached selenium-3.141.0-py2.py3-none-any.whl (904 kB)
Requirement already satisfied: urllib3 in c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages (from selenium) (1.25.10)
Installing collected packages: selenium
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\alteryx\\bin\\miniconda3\\envs\\jupytertool_venv\\Lib\\site-packages\\selenium'
Consider using the `--user` option or check the permissions.
 
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
<ipython-input-1-6966680d3ef3> in <module>
      2 # script here (only missing packages will be installed)
      3 from ayx import Package
----> 4 Package.installPackages(['selenium'])

c:\program files\alteryx\bin\miniconda3\envs\jupytertool_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\jupytertool_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\jupytertool_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\jupytertool_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\\jupytertool_venv\\python.exe', '-I', '-m', 'pip', 'install', 'selenium']' returned non-zero exit status 1.

 

Do you know why access would be denied or how I can fix this?

 

Thank you!

AndrewKramer
Alteryx Alumni (Retired)

Can you run Designer as admin and try to re-install selenium?

haphan_tran
7 - Meteor

You can add the --user to the install command to install it without admin right

snigdha25
7 - Meteor

I was running the python code on a licensed version of Alteryx and it was working fine but when I transferred my workflow to another system that had trial version then libraries installation started throwing error in python tool. What is the reason?

Labels