The simplest way is:
pip install ptypes
If you do not have internet access on the host where you need to install it, then download it from PyPI on a host where you do have internet access, copy the tarball over to the target host and:
tar -xf ptypes-<version>.tgz
cd ptypes-<version>
python setup.py install