1
votes

I'm struggling to follow the directions for installing Selenium on a windows machine and I need it for both Python 7.5 and C# platforms.

I ran the command :

D:\selenium-2.37.2> D:\Python27\python setup.py install 

And I get this:

Traceback (most recent call last):
  File "setup.py", line 17, in <<module>>
  from setuptools import setup ImportError: No module named setuptools

Setuptools? Errr... What is that? Of course I looked it up, but there is no way to get that in view of all that is advised.

Is there a sure-way of installing Selenium on Win 7 for python?.

2

2 Answers

0
votes

Have you tried this Python 3: ImportError "No Module named Setuptools" ?

According to this post, it might work even better with easy_install. Couldn't install pip and selenium in windows7

0
votes

Windows 7:

1. Install PyCharm education Edition IDE with Python 2.7 (JetBrains: https://www.jetbrains.com/pycharm-educational/)
2. Setup easy install (windows - simplified)
    a. download ez.setup.py (https://bootstrap.pypa.io/ez_setup.py) from 'https://pypi.python.org/pypi/setuptools'
    b. move ez.setup.py to C:\Python27\
    c. open cmd prompt
    d. cd C:\Python27\
    e. C:\Python27\python.exe ez.setup.py install
3. Setup selenium webdriver for python
    a. Download selenium source code from pypi : selenium-2.45.0.tar.gz from https://pypi.python.org/pypi/selenium
    b. unzip it using 7Z software
    c. open cmd prompt
    d. cd to selenium-2.45.0 unzipped directory
    e. C:\Python27\python.exe setup.py install
4. Test selenium webdriver for python
    a. Open PyCharm IDE
    b. create a new python file with the following contents:

        from selenium import webdriver
        browser=webdriver.Firefox()
        browser.get('http://seleniumhq.org/')

    c. Run the python script
    d. Firefox browser will open and navigate to the intended website
5. Done!