PPTools/Ppgen/Installation/WinInstallUser2

From DPWiki
Jump to navigation Jump to search

Installing Python

Python may end up installed in different places by default depending on which release of Python 3 you download. For example, by default

  • Python 3.4 prefers c:\Python34
  • Python 3.5 prefers c:\Program Files (x86)\Python35 (32-bit) or c:\Program Files\Python35 (64-bit)
  • Python 3.6 prefers something like c:\<username>\Appdata\Program Files\Python36.

Any of those locations will work, but make sure that during the installation you tell the installer to "Install for all users" and "Associate .py files with the Python interpreter" and "Add Python to path" (or to Environment variables). You may also tell the installer that you want to customize the installation if you prefer to specify a different directory.

If you do not associate .py files with the Python interpreter, and you plan to invoke ppgen using a .bat file, things will be easier if you ensure that none of the directories in the install path have a space in the directory name. That will require using the custom install option for Python 3.5 or 3.6. However, as long as you associate .py files with the interpreter you don't need to worry about where Python is installed.

Note that for Python 3.6 the Python downloads page prefers to install the 32-bit version of Python. If you want the 64-bit version you will need to search for it. To find it, you'll need to View All Downloads, then find the entry for Python 3.6.0, then click the download link. That will take you to another page where you can find all the installers including the 64-bit version.

Most recently I ended up installing the 64-bit version of 3.6.0 into directory e:\Program Files\Python36.

Note for advanced ppgen users: If you envision making frequent use of the .sr command (search/replace using regular expressions), are an expert in using Python regular expressions, and want some extra capabilities in the regular expressions you'll be using, you might also want to install the Python regex package. This is eventually intended to replace the standard Python re package. You can use either the standard re or the extended regex package with ppgen. Details of the differences/extensions are on the regex package page. If you want it, download and save the .whl file for your version of Python, then install it using pip install.

Installing ppgen

To install ppgen, choose either the production version or the development version. I recommend the development version, as it is more up-to-date with bug fixes and enhancements. For more details of the difference see the ppgen Release Notes.

Once you have downloaded the .zip file, unzip it and save the ppgen.py file in a directory of your choice, preferrably one with no spaces in the directory name. For example, on Windows you might save it in c:\DP\PP\Tools.