Search code examples
pythonpython-3.xghostscriptimporterrorcx-freeze

ImportError: No module named ghostscript


I get "ImportError: No module named ghostscript" when i try to build my python program using cx_freeze.

  • I'm using Windows 7 64 bit
  • I have python 3.6.2 32 bit
  • I installed ghostscript module using pip
  • I installed Ghostscript 9.21

Previously, everything worked fine with python 3.6.2 64 bit, but now i need to create a 32 bit executable

I'm learning python, so do not omit obvious answers


Solution

  • Download the .whl file from the link below,

    https://pypi.python.org/packages/6a/2d/e2d7474bea24d223d5dc86d51241fd305b75a9168f2e1d7ee07b883c80a5/python3_ghostscript-0.5.0-py3-none-any.whl#md5=0e3a24a374c0d9cc1f2008801ead6927

    Open cmd in the same directory of the .whl file and run this command:

    pip install python3_ghostscript-0.5.0-py3-none-any.whl