Windows source code to compile Python modules (reprint)

Has been to work in Linux and I wanted to install a python module in the windows, the occurrence of the following questions:
E: \ Download \ python \ python-cjson-1.0.3> python setup.py install
running install
running build
running build_ext
building 'cjson' extension
error: Python was built with Visual Studio version 7.1, and extensions need to b
e built with the same version of the compiler, but it isn't installed.

the next google found a solution:
I found an Alternate Solution by configuring MingW
Task:
RDFLib installation
Problem:
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.
Solution:
How to Configure Mingw:
* Download last release from http://prdownloads.sourceforge.net/mingw (MinGW-5.1.3.exe)
* Run the file to start the installation process
* Keep all values at their defaults and select at least next components:
o MinGW base tools
o g + + compiler
o MinGW Make
* Add the C: \ mingw \ bin directory to the system PATH
* Create (or edit) a. Cfg file for distutils (distutils.cfg) eg: C: \ Python25 \ Lib \ distutils \ distutils.cfg with this content:
[Build]
compiler = mingw32
[Build_ext]
compiler = mingw32

Then type in your RDFlib directory> python setup.py install
creating C: \ Python25 \ Lib \ site-packages \ rdflib \ store
copying build \ lib.win32-2.5 \ rdflib \ store \ AbstractSQLStore.py -> C: \ Python25 \ Lib \
site-packages \ rdflib \ store
copying build \ lib.win32-2.5 \ rdflib \ store \ AuditableStorage.py -> C: \ Python25 \ Lib \
site-packages \ rdflib \ store
copying build \ lib.win32-2.5 \ rdflib \ store \ Concurrent.py -> C: \ Python25 \ Lib \ site-p
ackages \ rdflib \ store
....
....
....
Writing C: \ Python25 \ Lib \ site-packages \ rdflib-2.3.3-py2.5.egg-info
Thats it Good Luck!
Further Source: http://livingpyxml.python-hosting.com/wiki/AmaraWindowsInstallTips
Try

E: \ Download \ python \ python-cjson-1.0.3> python setup.py install
running install
running build
running build_ext
building 'cjson' extension
D: \ MinGW \ bin \ gcc.exe-mno-cygwin-mdll-O-Wall-ID: \ Python25 \ include-ID: \ Pytho
n25 \ PC-c cjson.c-o build \ temp.win32-2.5 \ Release \ cjson.o
writing build \ temp.win32-2.5 \ Release \ cjson.def
creating build \ lib.win32-2.5
D: \ MinGW \ bin \ gcc.exe-mno-cygwin-shared-s build \ temp.win32-2.5 \ Release \ cjson.o
build \ temp.win32-2.5 \ Release \ cjson.def-LD: \ Python25 \ libs-LD: \ Python25 \ PCBuild
-Lpython25-lmsvcr71-o build \ lib.win32-2.5 \ cjson.pyd
running install_lib
copying build \ lib.win32-2.5 \ cjson.pyd -> D: \ Python25 \ Lib \ site-packages
running install_egg_info
Writing D: \ Python25 \ Lib \ site-packages \ python_cjson-1.0.3-py2.5.egg-info

Success
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Windows source code to compile Python modules (reprint)

  • Rails source code analysis (4): Request / Response

    1) Rails defines two abstract class: AbstractRequest and AbstractResponse code is not posted, first take a look at Response. 2) is mainly responsible for the specific ctgi_process.rb main interface is responsible for implementation methods of impleme ...

  • [Have resolved] how to give rails of the model class of congestive (include / extent module)

    Has been resolved Please visit: http://henrik.nyh.se/2008/02/rails-model-extensions 1: the introduction of new features to the controller My approach: I tried to introduce in the application controller extra modules: require "string" This "string

  • Unable to load bean: type: struts-derfault.xml abnormal

    Struts2 in the use of a lot of friends from time to time we encountered this anomaly, leading to its main reason is because the wrong package, we have to be xwork-2.1.1.jar and struts2-core-2.1.2.jar, replaced xwork-2.0. 4.jar and struts2-core-2.0.14.jar

  • Rails2.0.2 change the default DB adpter

    In Rails2.0.2 rails demo ... ... MissingSourceFile in SayController # hello no such file to load - sqlite3 RAILS_ROOT: / home / kenb / rails-projects / demo ... ... Checked config / database.yml, adpter default is set become the sqlite3. Check the ra ...

  • Answer: After 2.2 upgrade mysql question-driven

    windows installed after the mysql gem error, error is approximately: ArgumentError (NULL pointer given): (eval): 3: in `each_hash ' (eval): 3: in `all_hashes' This is feeling under the windows of the question if the mysql gem version libmysql ...

  • Use Ext JS to read the JsonReader complex object json

    Today was how to resolve the following complex json object to the difficult living over a long time .. did not find documentation how to read JsonReader Ways json object (possibly also because of their limited level of E the text did not correctly underst

  • Struts2 Spring Hibernate integration of easy

    1. Add Spring 2.0 in Libraries Choose the following four jar, and configure the / WEB-INF/lib under Spring2.0 AOP Libraries Spring2.0 Core Libraries Spring2.0 Persistence Core Libraries Spring2.0 WEb Libraries At the same time, the applicationContext ...

  • EJB ant script to deploy template works

    <? xml version = "1.0" encoding = "UTF-8"?> <! - Name Project name basedir build.xml file directory -> <project name="HelloWorld" basedir="."> <! - Property variables -> <! - The sour ...

  • Struts2 Spring Hibernate's easy to integrate

    1. Add Spring 2.0 in Libraries Choose the following four jar, and configure the / WEB-INF/lib under Spring2.0 AOP Libraries Spring2.0 Core Libraries Spring2.0 Persistence Core Libraries Spring2.0 WEb Libraries At the same time, the applicationContext ...

  • NoClassDefFoundError: javax / servlet / Servlet

    In the project in order to achieve a listener in web.xml set up a listener, did start in Tomcat actually occurred after java.lang.NoClassDefFoundError: javax / servlet / ServletContextListener this anomaly google and found the reasons for the lack of serv

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries