How to Make a PyMe (Python library) Run in Python 2.4 on Windows?

纵然是瞬间 提交于 2019-12-11 17:33:10

问题


I want to run this library on Python 2.4 in Windows XP.

I installed the pygpgme-0.8.1.win32.exe file but got this:

>>> from pyme import core
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python24\Lib\site-packages\pyme\core.py", line 22, in ?
    import pygpgme
  File "C:\Python24\Lib\site-packages\pyme\pygpgme.py", line 7, in ?
    import _pygpgme
ImportError: DLL load failed: The specified module could not be found.

And then this pop up comes up

---------------------------
python.exe - Unable To Locate Component
---------------------------
This application has failed to start because python25.dll was not found. Re-installing the application may fix this problem.
---------------------------
OK  

Do I need to "compile" it for Python 2.4? How do I do that?


回答1:


While the pygpgme project does not clearly document it, it's clear from the error message you got that their .win32.exe was indeed compiled for Python 2.5.

To compile their code for Python 2.4 (assuming they support that release!), download their sources, unpack them, open a command window, cd to the directory you unpacked their sources in, and run python setup.py install. This will probably not work unless you have the right Microsoft C compiler installed (MSVC 6.0 if I recall correctly).

It's no doubt going to be much less trouble to download, install and use Python 2.5 for Windows (it can perfectly well coexist with your current 2.4, no need to remove that). Is that a problem?



来源:https://stackoverflow.com/questions/1030297/how-to-make-a-pyme-python-library-run-in-python-2-4-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!