You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows10 64位Python2.7环境下SIP与PyQt4安装故障求助

Hey there, let's sort out that make command not recognized issue you're hitting while trying to install SIP and PyQt4 from source on your Windows 10 64-bit system with Python 2.7.14 (Anaconda 2.7.14). Here's the breakdown and fixes:

Why the make Command Fails

Windows doesn't come with the GNU make tool preinstalled—it's a utility designed for Unix-like systems (Linux/macOS). When you try running make in CMD, your system has no idea what that command means, hence the error. To compile SIP and PyQt4 from source, you'll either need to use a Windows-compatible compilation toolchain, or take the much easier route with Anaconda's package manager.

Since you're already using Anaconda, you can skip the entire source compilation hassle by installing pre-built packages directly. Here's how:

  1. Open the Anaconda Prompt (not regular CMD—this ensures your Anaconda environment is properly configured).
  2. Run this command to install SIP 4.19.7 and PyQt4:
    conda install -c conda-forge sip=4.19.7 pyqt=4
    

This will handle all dependencies and installation automatically, no manual compilation needed.

Solution 2: Compile from Source with a Windows Toolchain

If you absolutely need to compile from source (e.g., for custom modifications), follow one of these two options:

Option A: Use MinGW-w64

MinGW-w64 provides a GNU-compatible toolchain for Windows, including mingw32-make (the Windows equivalent of make):

  1. Download MinGW-w64 (pick the 64-bit version with the posix thread model and seh exception handling for best compatibility).
  2. Install it to a directory without spaces (e.g., C:\mingw-w64).
  3. Add the MinGW-w64 bin folder (like C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin) to your system PATH environment variable.
  4. Restart your CMD or Anaconda Prompt to apply the PATH changes.
  5. Navigate back to your SIP source folder, then run:
    python configure.py
    mingw32-make
    mingw32-make install
    

Use mingw32-make instead of make—this is the MinGW equivalent that your system will recognize.

Option B: Use Microsoft Visual C++ Compiler for Python 2.7

Microsoft released a dedicated compiler for Python 2.7, which works well with PyQt4:

  1. Download and install the Microsoft Visual C++ Compiler for Python 2.7 (it's a free tool from Microsoft).
  2. Open the Visual C++ 2010 x64 Native Tools Command Prompt (this comes with the installer, and it pre-configures the compiler environment for 64-bit builds).
  3. Navigate to your SIP source folder, then run:
    python configure.py --platform win32-msvc2010
    nmake
    nmake install
    

Here, nmake is Microsoft's equivalent of make, and we specify the MSVC platform for the configure script to generate the correct Makefile.

A quick heads-up: Python 2.7 and PyQt4 are both end-of-life, so if possible, consider upgrading to a newer Python version and PyQt5/PyQt6 for better support and security. But if you're stuck with this environment, the above steps should get you sorted.

内容的提问来源于stack exchange,提问作者Ibrahem Mohamed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 06:29:40