<bdo id='0ns5r'></bdo><ul id='0ns5r'></ul>

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

      <small id='0ns5r'></small><noframes id='0ns5r'>

        无法在 Windows 10 上使用 python2.7/MINGW 安装 pyslalib 包

        时间:2023-06-05

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

        <legend id='vnrl5'><style id='vnrl5'><dir id='vnrl5'><q id='vnrl5'></q></dir></style></legend>

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

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

                  <tbody id='vnrl5'></tbody>
                • 本文介绍了无法在 Windows 10 上使用 python2.7/MINGW 安装 pyslalib 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在 Windows 10 上使用 python 2.7 安装 pyslalib 包,并不断收到以下信息:

                  I'm trying to install the pyslalib package using python 2.7 on Windows 10 and keep getting the following:

                  collect2.exe:错误:ld 返回 1 个退出状态"

                  "collect2.exe: error: ld returned 1 exit status"

                  当我尝试运行python setup.py install"时的消息.我认为这可能是我的 mingw 配置的问题,但我似乎无法找到问题所在.

                  message when I try to run "python setup.py install". I think this might be an issue with my mingw configuration, but I can't seem to locate the problem.

                  对于这个问题的任何帮助将不胜感激.我周末大部分时间都在为此苦苦挣扎.

                  Any help with this issue would be greatly appreciated. I've eaten up most of the weekend struggling with this.

                  谢谢,

                  输出错误是:

                  C:Python27libs/libpython27.a(dmmes01026.o):(.idata$7+0x0): undefined reference to `_head_C__build27_cpython_PCBuild_libpython27_a'
                  C:Python27libs/libpython27.a(dmmes00281.o):(.idata$7+0x0): undefined reference to `_head_C__build27_cpython_PCBuild_libpython27_a'
                  C:Python27libs/libpython27.a(dmmes00105.o):(.idata$7+0x0): undefined reference to `_head_C__build27_cpython_PCBuild_libpython27_a'
                  C:Python27libs/libpython27.a(dmmes00253.o):(.idata$7+0x0): undefined reference to `_head_C__build27_cpython_PCBuild_libpython27_a'
                  C:Python27libs/libpython27.a(dmmes00227.o):(.idata$7+0x0): undefined reference to `_head_C__build27_cpython_PCBuild_libpython27_a'
                  C:Python27libs/libpython27.a(dmmes00712.o):(.idata$7+0x0): more undefined references to `_head_C__build27_cpython_PCBuild_libpython27_a' follow
                  collect2.exe: error: ld returned 1 exit status
                  

                  推荐答案

                  这好像是我最近遇到的一个问题.我认为 Python 附带的 libpython27.a 存在问题(我使用的是 2.7.10 版).根据 python27.dll 创建我自己的 libpython27.a="nofollow">这里解决了这个问题.

                  This looks like a problem I had recently. I think there is a problem with the libpython27.a that comes included with Python (I'm on version 2.7.10). Creating my own libpython27.a from the python27.dll as per the instructions found here fixed the problem.

                  要创建 Python 扩展,您需要链接到 Python图书馆.不幸的是,大多数 Python 发行版都提供了Python22.lib,Microsoft Visual C++ 格式的库.海合会期望一个.a 文件(准确地说是 libpython22.a.).以下是转换方法python22.liblibpython22.a:

                  To create Python extensions, you need to link against the Python library. Unfortunately, most Python distributions are provided with Python22.lib, a library in Microsoft Visual C++ format. GCC expects a .a file (libpython22.a to be precise.). Here's how to convert python22.lib to libpython22.a:

                  1. 下载 pexport(从这里或https://web.archive.org/web/20000829082204/http://starship.python.net/crew/kernr/mingw32/pexports-0.42h.zip).
                  2. 获取Python22.dll(它应该在你硬盘的某个地方).
                  3. 运行:pexports python22.dll >python22.def 这将提取所有符号从 python22.dll 并将它们写入 python22.def.
                  4. 运行:dlltool --dllname python22.dll --def python22.def --output-lib libpython22.a 这将创建 libpython22.a (dlltool 是 MinGW 实用程序的一部分).
                  5. libpython22.a 复制到 c:python22libs (与python22.lib).
                  1. Download pexport (from here or https://web.archive.org/web/20000829082204/http://starship.python.net/crew/kernr/mingw32/pexports-0.42h.zip).
                  2. Get Python22.dll (it should be somewhere on your harddrive).
                  3. Run : pexports python22.dll > python22.def This will extract all symbols from python22.dll and write them into python22.def.
                  4. Run : dlltool --dllname python22.dll --def python22.def --output-lib libpython22.a This will create libpython22.a (dlltool is part of MinGW utilities).
                  5. Copy libpython22.a to c:python22libs (in the same directory as python22.lib).

                  这个技巧应该适用于所有 Python 版本,包括 Python 的未来版本.你也可以使用这个技巧转换其他库.

                  This trick should work for all Python versions, including future releases of Python. You can also use this trick to convert other libraries.

                  这篇关于无法在 Windows 10 上使用 python2.7/MINGW 安装 pyslalib 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 python 脚本使 Windows 10 计算机进入睡眠状态? 下一篇:Python TA-Lib 安装问题

                  相关文章

                  <tfoot id='0xj6q'></tfoot>

                    <small id='0xj6q'></small><noframes id='0xj6q'>

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