I am trying to generate an executable file of a python script using Selenium except when running my setup script I receive an error:
can't copy 'C:\Python27\Lib\site-packages\selenium\webdrive\firefox\webdriver.xpi':
doesn't exist or not a regular file
I am able to generate an executable that does not require selenium and I know that my selenium works if I run the code through python. Here is my setup.py code:
from distutils.core import setup
import py2exe
# Change the path in the following line for webdriver.xpi
data_files = [('selenium/webdriver/firefox', ['C:/Python27/Lib/site-packages/selenium/webdrive/firefox/webdriver.xpi'])]
setup(
name='General name of app',
version='1.0',
description='General description of app',
author='author name',
author_email='author email',
url='',
windows=[{'script': 'setup_test.py'}], # the main py file
data_files=data_files,
options={
'py2exe':
{
'skip_archive': True,
'optimize': 2,
}
}
)
Does anybody know what is causing this and/or how to fix it? Thanks