我在我的机器上安装了ghostscript,位于
C:\Program Files (x86)\gs\gs9.20
并通过pip安装了python模块
pip install ghostscript
然而,当我尝试导入ghostscript时,我收到此错误
>>> import ghostscript
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import ghostscript
File "C:\Python27\lib\site-packages\ghostscript\__init__.py", line 33, in <module>
import _gsprint as gs
File "C:\Python27\lib\site-packages\ghostscript\_gsprint.py", line 281, in <module>
libgs = windll.LoadLibrary(libgs)
File "C:\Python27\lib\ctypes\__init__.py", line 440, in LoadLibrary
return self._dlltype(name)
File "C:\Python27\lib\ctypes\__init__.py", line 362, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be string, not Unicode
答案 0 :(得分:0)
Ghost脚本无法在python v2.7.13中运行,因此运行v2.7.12的安装并通过v2.7.12导入而没有错误