<legend id='Omch2'><style id='Omch2'><dir id='Omch2'><q id='Omch2'></q></dir></style></legend>
    <i id='Omch2'><tr id='Omch2'><dt id='Omch2'><q id='Omch2'><span id='Omch2'><b id='Omch2'><form id='Omch2'><ins id='Omch2'></ins><ul id='Omch2'></ul><sub id='Omch2'></sub></form><legend id='Omch2'></legend><bdo id='Omch2'><pre id='Omch2'><center id='Omch2'></center></pre></bdo></b><th id='Omch2'></th></span></q></dt></tr></i><div id='Omch2'><tfoot id='Omch2'></tfoot><dl id='Omch2'><fieldset id='Omch2'></fieldset></dl></div>
      • <bdo id='Omch2'></bdo><ul id='Omch2'></ul>

      1. <small id='Omch2'></small><noframes id='Omch2'>

        <tfoot id='Omch2'></tfoot>

      2. 无法安装 python 模块“pycrypto"在 Debian 上

        时间:2023-11-08

          <bdo id='ONFv5'></bdo><ul id='ONFv5'></ul>

          <small id='ONFv5'></small><noframes id='ONFv5'>

          <i id='ONFv5'><tr id='ONFv5'><dt id='ONFv5'><q id='ONFv5'><span id='ONFv5'><b id='ONFv5'><form id='ONFv5'><ins id='ONFv5'></ins><ul id='ONFv5'></ul><sub id='ONFv5'></sub></form><legend id='ONFv5'></legend><bdo id='ONFv5'><pre id='ONFv5'><center id='ONFv5'></center></pre></bdo></b><th id='ONFv5'></th></span></q></dt></tr></i><div id='ONFv5'><tfoot id='ONFv5'></tfoot><dl id='ONFv5'><fieldset id='ONFv5'></fieldset></dl></div>

              <tfoot id='ONFv5'></tfoot>
                1. <legend id='ONFv5'><style id='ONFv5'><dir id='ONFv5'><q id='ONFv5'></q></dir></style></legend>
                    <tbody id='ONFv5'></tbody>
                2. 本文介绍了无法安装 python 模块“pycrypto"在 Debian 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我尝试通过下载源代码并执行以下命令python setup.py install来安装pycrypto模块,然后出现错误

                  I tried to install pycrypto module by downloading the source code and executing the following command python setup.py install, then an error came

                  running install
                  running build
                  running build_py
                  running build_ext
                  warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
                  building 'Crypto.Hash.MD2' extension
                  gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.5 -c src/MD2.c -o build/temp.linux-x86_64-2.5/src/MD2.o
                  src/MD2.c:31:20: error: Python.h: No such file or directory
                  src/MD2.c:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
                  In file included from src/MD2.c:134:
                  src/hash_template.c:42: error: expected specifier-qualifier-list before 'PyObject_HEAD'
                  src/hash_template.c:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PyTypeObject'
                  src/hash_template.c: In function 'newALGobject':
                  src/hash_template.c:55: warning: implicit declaration of function 'PyObject_New'
                  src/hash_template.c:55: error: expected expression before 'ALGobject'
                  src/hash_template.c:55: warning: assignment makes pointer from integer without a cast
                  src/hash_template.c: At top level:
                  src/hash_template.c:62: error: expected ')' before '*' token
                  src/hash_template.c:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
                  src/hash_template.c:96: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
                  src/hash_template.c:108: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
                  src/hash_template.c:143: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
                  src/hash_template.c:160: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ALG_methods'
                  src/hash_template.c:169: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
                  src/hash_template.c:178: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ALGtype'
                  src/hash_template.c:203: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
                  src/hash_template.c:237: error: array type has incomplete element type
                  src/hash_template.c:238: error: 'PyCFunction' undeclared here (not in a function)
                  src/hash_template.c:238: error: expected '}' before 'ALG_new'
                  src/hash_template.c: In function 'initMD2':
                  src/hash_template.c:254: error: 'PyObject' undeclared (first use in this function)
                  src/hash_template.c:254: error: (Each undeclared identifier is reported only once
                  src/hash_template.c:254: error: for each function it appears in.)
                  src/hash_template.c:254: error: 'm' undeclared (first use in this function)
                  src/hash_template.c:256: error: 'ALGtype' undeclared (first use in this function)
                  src/hash_template.c:256: error: 'PyType_Type' undeclared (first use in this function)
                  src/hash_template.c:257: warning: implicit declaration of function 'Py_InitModule'
                  src/hash_template.c:260: error: 'o' undeclared (first use in this function)
                  src/hash_template.c:260: warning: implicit declaration of function 'PyInt_FromLong'
                  src/hash_template.c:260: warning: implicit declaration of function 'PyDict_SetItemString'
                  src/hash_template.c:260: warning: implicit declaration of function 'PyModule_GetDict'
                  src/hash_template.c:260: warning: implicit declaration of function 'Py_DECREF'
                  src/hash_template.c:263: warning: implicit declaration of function 'PyErr_Occurred'
                  src/hash_template.c:264: warning: implicit declaration of function 'Py_FatalError'
                  error: command 'gcc' failed with exit status 1
                  

                  这意味着他没有找到 Python.h.我在网上搜索了这个错误,似乎通过安装python头文件可以解决问题,但是我的Debian lenny却出现了另一个错误.

                  Which means that he didn't find the Python.h. I searched online for this error and it seems that by installing the python header file the problem will be solved, but my Debian lenny came with anther error.

                  apt-get install python2.6-dev
                  

                  和错误:

                  Reading package lists... Done
                  Building dependency tree
                  Reading state information... Done
                  E: Couldn't find package python2.6-dev
                  

                  推荐答案

                  不要从源代码安装.改为安装 Debian 软件包:

                  Don't install it from source. Install the Debian package instead:

                  aptitude install python-crypto
                  

                  并安装 python 开发文件(如果您遵循我的上述建议,则无论如何都不需要):

                  And to install the python dev files (which you won't need anyway if you follow my above advice):

                  aptitude install python-dev
                  

                  这篇关于无法安装 python 模块“pycrypto"在 Debian 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:只是在 python 脚本中写“导入"会破坏我的鼠标光标,强制进行硬重置 下一篇:Pytest 版本冲突错误

                  相关文章

                3. <small id='O1yU2'></small><noframes id='O1yU2'>

                  <legend id='O1yU2'><style id='O1yU2'><dir id='O1yU2'><q id='O1yU2'></q></dir></style></legend>
                  <i id='O1yU2'><tr id='O1yU2'><dt id='O1yU2'><q id='O1yU2'><span id='O1yU2'><b id='O1yU2'><form id='O1yU2'><ins id='O1yU2'></ins><ul id='O1yU2'></ul><sub id='O1yU2'></sub></form><legend id='O1yU2'></legend><bdo id='O1yU2'><pre id='O1yU2'><center id='O1yU2'></center></pre></bdo></b><th id='O1yU2'></th></span></q></dt></tr></i><div id='O1yU2'><tfoot id='O1yU2'></tfoot><dl id='O1yU2'><fieldset id='O1yU2'></fieldset></dl></div>

                      • <bdo id='O1yU2'></bdo><ul id='O1yU2'></ul>
                      <tfoot id='O1yU2'></tfoot>