Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-391

pip install pymongo fails to build C extensions on Windows -- "Above is the ouput " (sic)

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.1
    • Component/s: None
    • Environment:
      Windows 7 x64, Visual Studio 2010 Professional, pip

      Two related issues, one "major", one a typo (and missing diagnostics).

      Trying to upgrade pymongo to version 2.2.1 on Windows 7 x64 using pip and having no luck getting it to build the C extensions.

      11:22:21.02 C:\> vcvarsall amd64
      Setting environment for using Microsoft Visual Studio 2010 x64 tools.
      
      11:22:32.31 C:\> pip install pymongo
      Downloading/unpacking pymongo
        Downloading pymongo-2.2.1.tar.gz (230Kb): 230Kb downloaded
        Running setup.py egg_info for package pymongo
      
      Installing collected packages: pymongo
        Running setup.py install for pymongo
          building 'bson._cbson' extension
          Unable to find vcvarsall.bat
          building 'pymongo._cmessage' extension
          Unable to find vcvarsall.bat
          C:\build\pymongo\setup.py:183: UserWarning:
          ********************************************************************
          WARNING: The bson._cbson extension module could not
          be compiled. No C extensions are essential for PyMongo to run,
          although they do result in significant speed improvements.
      
          If you are seeing this message on Linux you probably need to
          install GCC and/or the Python development package for your
          version of Python.
      
          Debian and Ubuntu users should issue the following command:
      
              $ sudo apt-get install build-essential python-dev
      
          RedHat, CentOS, and Fedora users should issue the following command:
      
              $ sudo yum install gcc python-devel
      
          Above is the ouput showing how the compilation failed.
          ********************************************************************
      
            "Above is the ouput "
          C:\build\pymongo\setup.py:183: UserWarning:
          ********************************************************************
          WARNING: The pymongo._cmessage extension module could not
          be compiled. No C extensions are essential for PyMongo to run,
          although they do result in significant speed improvements.
      
          If you are seeing this message on Linux you probably need to
          install GCC and/or the Python development package for your
          version of Python.
      
          Debian and Ubuntu users should issue the following command:
      
              $ sudo apt-get install build-essential python-dev
      
          RedHat, CentOS, and Fedora users should issue the following command:
      
              $ sudo yum install gcc python-devel
      
          Above is the ouput showing how the compilation failed.
          ********************************************************************
      
            "Above is the ouput "
      
      Successfully installed pymongo
      Cleaning up...
      
      11:22:52.21 C:\> pip --version
      pip 1.1 from c:\python27\lib\site-packages\pip-1.1-py2.7.egg (python 2.7)
      
      11:32:33.03 C:\> python --version
      Python 2.7.3
      
      11:32:49.35 C:\>
      

      I'm not sure where it is looking for "vcvarsall.bat" but it isn't looking on my PATH.

      "Above is the ouput " should say "output" and the extra printing of this line looks like an error anyway.

      Should the setup.py script give instructions for Debian, Ubuntu, RedHat, CentOS and Fedora (and nothing about Windows) when installing on Windows? Are there instructions for Windows that would have helped me here?

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            tad Tad Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: