【问题标题】:Compile Python debug and pip install debug libraries编译 Python 调试和 pip 安装调试库
【发布时间】:2014-09-28 15:28:31
【问题描述】:

我正在尝试在我的 PySide 应用程序中调试一些神秘的崩溃。我目前在 Windows 中使用 Python 2.7,并希望构建 Python 和 PySide 的调试版本来帮助调试。我按照here 的说明使用 MSVC 2013 构建了 Python 的调试版本。构建在大部分情况下都可以正常工作,其中一些我不关心的库无法编译。

我使用上面链接中的相同说明将相关文件复制到 c:\python27_d 并为其设置了虚拟环境。但是,当我尝试 easy_install 或 pip 安装 paramiko 或 pycrypto 等库时,我会收到链接错误:

winrand.obj : error LNK2019: unresolved external symbol __imp__Py_InitModule4 referenced in function _initwinr
andom

build\lib.win32-2.7-pydebug\Crypto\Random\OSRNG\winrandom.pyd : fatal error LNK1120: 1 unresolved externals

一般来说,我如何为 Python 的调试版本安装库或模块?对于提出如此广泛的问题,我深表歉意,但我不熟悉 Python 如何知道在哪里找到未解析链接的内部原理。

【问题讨论】:

  • 我是否可以建议您退回到最初的问题并重新评估在 Windows 上构建新版本的 Python 是否是最佳步骤?你能在另一个平台上重现你的错误吗?您能否描述您的错误,以便我们提供更好的解决方案?还是有问题吗?

标签: python visual-studio-2013 pip pyside pycrypto


【解决方案1】:

cd 到C:\Python27\Scripts 然后运行:

pip install PySide --use-wheel -f https://download.qt-project.org/official_releases/pyside/ 

【讨论】:

    猜你喜欢
    • 2021-12-22
    • 2018-09-30
    • 2018-10-04
    • 2010-10-13
    • 1970-01-01
    • 2015-07-21
    • 1970-01-01
    • 2020-05-06
    • 1970-01-01
    相关资源
    最近更新 更多