Windows Environment
From OpenLP
Contents |
Installing Python
The recommended version of Python is version 2.6, but OpenLP runs on 2.7 as well.
Not all the packages maybe available in 64bit yet (so you can ignore the 64 bit notes below for now).
Download and install the Python Windows Installer from Python download page.
Installing Python Extensions for Windows
For automating PowerPoint, the Python Extensions for Windows will be required: Pywin32 SourceForge download page
Get the version corresponding to the Python version installed. Search for an exe, rather than the zip file it may default to.
Installing PyQt4
The recommended version of PyQt4 is version 4.7.0 or higher.
Download the binary package from the link at the bottom of the PyQt4 download page. This includes Qt4.
Installing SQLAlchemy, chardet, BeautifulSoup, lxml, PyEnchant and Mako
In order to get some of the extra packages OpenLP requires, you need to install EasyInstall first. Download ez_setup.py and run by opening your command prompt (Start -> Run -> "cmd.exe") and typing in the following:
C:\Downloads> python ez_setup.py
Download ez_setup.py and run it. (you will probably need to right click the link and click save as)
Bring up a command prompt and run:
C:\> C:\Python26\scripts\easy_install.exe sqlalchemy sqlalchemy-migrate chardet beautifulsoup pyenchant mako lxml
Prior to 2.7, you may need to manually install lxml and pyenchant, rather than use easy_install.
If you get errors attempting to install lxml, it may be due to the latest version not having a binary version available. Try the following instead:
C:\> C:\Python26\scripts\easy_install.exe lxml==2.3.0
Note for 64-bit Systems
The ez_setup.py script currently installs a broken version of setuptools on 64-bit Windows systems.
To work around this you need to manually download SQLAlchemy and extract it. When extracted you need to copy the <top_dir>/lib/sqlalchemy directory into your Python<version>\Lib\site-packages directory.
You also need to manually download chardet and extract it. When extracted you need to copy the <top_dir>\chardet directory into the same Python<version>\Lib\site-packages directory.
Install MySQL and PostgreSQL bindings (optional)
Do this step only if you are going to package OpenLP or if you need support for MySQL or PostgreSQL database servers.
Installers for MySQL and PostgreSQL python bindings can be downloaded from win-psycopg download page and from unofficial Windows Binaries for python download page.
Verify Installation
Once you have completed this, check the install is successful by launching python script in a command prompt:
C:\python26\python OPENLP_SRC\scripts\check_dependencies.py
or
C:\python27\python OPENLP_SRC\scripts\check_dependencies.py
The output should be similar to the following:
Python >= 2.6 ... 2.7.1.final.0 Checking for modules... PyQt4... OK PyQt4.QtCore... OK PyQt4.QtGui... OK PyQt4.QtNetwork... OK PyQt4.QtOpenGL... OK PyQt4.QtSvg... OK PyQt4.QtTest... OK PyQt4.QtWebKit... OK PyQt4.phonon... OK sqlalchemy... OK sqlite3... OK lxml... OK chardet... OK enchant... OK BeautifulSoup... OK mako... OK migrate... OK Checking for optional modules... sqlite (SQLite 2 support)... FAIL MySQLdb (MySQL support)... FAIL psycopg2 (PostgreSQL support)... FAIL pytest (testing framework)... FAIL Checking for Windows specific modules... win32com... OK win32ui... OK pywintypes... OK Verifying version of modules... PyQt4 >= 4.6 ... 4.8.1 Qt4 >= 4.6 ... 4.7.0 sqlalchemy >= 0.5 ... 0.7.1 enchant >= 1.6 ... 1.6.5 Qt4 image formats... read: bmp, pbm, pgm, png, ppm, xbm, xpm write: bmp, png, ppm, xbm, xpm Enchant (spell checker)... available backends: ispell, myspell available languages: de_DE, en_AU, en_GB, en_US, fr_FR