Zebra Printer Python Package in Pycharm

2019-08-01 20:23发布

问题:

I am trying to install the zebra-0.0.5 package in pycharm on a windows machine. I did have pip and win32 installed. But this error keep showing up. Would someone had similar experience before help? Thanks!

Could not find a version that satisfies the requirement win32print (from zebra) (from versions: ) No matching distribution found for win32print (from zebra)

回答1:

The zebra module depends on a module called win32print on Windows for the installation to complete. Since the win32print module is no longer available anywhere it gives you error.

Possible Solution 1:

  • Switch to linux as it does not require the win32print module on linux

Possible Solution 2:

  • Install pywin32 / pypiwin32. Install any one of the modules and use it.

  • Download zebra 0.0.5 source code from here

  • Extract it and edit the setup.py file and more specifically the line 23 which says install_requires='pywin32/pypiwin32':

    if sys.platform.lower().startswith('win'): install_requires = 'pywin32/pypiwin32' else: install_requires = None

  • Now, edit the zebra.py file and change all references from win32print to pywin32/pypiwin32.

NOTE: I haven't tried this solution as I don't have a zebra printer. I hope this would help you.