问题描述
我正在尝试在 Windows 机器上的 pycharm 中安装 zebra-0.0.5 包.我确实安装了 pip 和 win32.但是这个错误一直出现.有人在帮助之前有类似的经历吗?谢谢!
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!
找不到满足 win32print 要求的版本(来自 zebra)(来自版本:)找不到与 win32print 匹配的发行版(来自 zebra)
Could not find a version that satisfies the requirement win32print (from zebra) (from versions: ) No matching distribution found for win32print (from zebra)
推荐答案
zebra 模块依赖于 Windows 上名为 win32print 的模块才能完成安装.由于 win32print 模块在任何地方都不再可用,因此它会给您带来错误.
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.
可能的解决方案 1:
- 切换到 linux,因为它不需要 linux 上的 win32print 模块
可能的解决方案 2:
Install pywin32 / pypiwin32. Install any one of the modules and use it.
从 下载 zebra 0.0.5 源代码这里
Download zebra 0.0.5 source code fromhere
解压并编辑 setup.py 文件,更具体地说是该行23 表示 install_requires='pywin32/pypiwin32':
Extract it and edit the setup.py file and more specifically the line23 which says install_requires='pywin32/pypiwin32':
if sys.platform.lower().startswith('win'):install_requires = 'pywin32/pypiwin32'别的:install_requires = 无
现在,编辑 zebra.py 文件并更改 win32print 中的所有引用到 pywin32/pypiwin32.
Now, edit the zebra.py file and change all references from win32printto pywin32/pypiwin32.
注意:我没有尝试过这个解决方案,因为我没有 zebra 打印机.我希望这会帮助你.
NOTE: I haven't tried this solution as I don't have a zebra printer. I hope this would help you.
这篇关于Pycharm 中的 Zebra 打印机 Python 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!