【问题标题】:Compiler error while installing py-bcrypt in Windows 7在 Windows 7 中安装 py-bcrypt 时出现编译器错误
【发布时间】:2013-03-31 16:16:44
【问题描述】:

我需要安装需要py-bcrypt 的Flask 模块flask-bcrypt。当我尝试安装它时,出现错误:

C:\Users\Param\Downloads\py-bcrypt-0.3>python setup.py install
running install
running bdist_egg
running egg_info
writing py_bcrypt.egg-info\PKG-INFO
writing top-level names to py_bcrypt.egg-info\top_level.txt
writing dependency_links to py_bcrypt.egg-info\dependency_links.txt
reading manifest file 'py_bcrypt.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'py_bcrypt.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
error: don't know how to compile C/C++ code on platform 'nt' with 'MinGW32' comp
iler

是什么导致了这个问题?

以前,我在我的 Windows 7 64 位机器上安装了 MinGW32。是否因为 MinGW 是 32 位而 Windows 是 64 位而出现问题?如果是这样,我应该怎么做才能解决这个问题? (如何在我的机器上使用 MinGW 64 位?)

【问题讨论】:

    标签: python windows compiler-construction mingw flask


    【解决方案1】:

    这些库已经编译并在某处可用。有人已经上传了 Windows 的编译版本。我能够使用这些文件在 Windows 中运行 flask-bcrypt。

    您只需将其放入您的 flask/scripts/python 包文件夹中即可。

    在 Flask subreddit 中得到了回答提供了下载所需库的位置

    http://www.reddit.com/r/flask/comments/15q5xj/anyone_have_a_working_version_of_flaskbcrypt_for/

    【讨论】:

    • py-bcrypt 0.4 轮子刚刚添加到同一位置。
    • 这只是 python 2 - 有没有 python 3 二进制文件?
    【解决方案2】:

    these MinGW binaries 获得战利品。它应该是专门为构建 Python 扩展模块而定制的 MinGW GCC 版本。

    此安装程序尝试修复使用 GCC 编译 Python distutils 扩展的所有问题

    【讨论】:

    • 现在它给出了新的错误:“command 'gcc' failed with exit status 1”
    • @Man8Blue py-bcrypt 是 bcrypt 的扩展,这意味着您需要先构建 bcrypt 库才能构建它。如果您在设置时遇到问题,最好寻找二进制文件。
    猜你喜欢
    • 2015-09-25
    • 2011-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多