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

分类:Python 时间:2010-10-20 人气:347
分享到:
blog comments powered by Disqus

相关文章

  • C # project in the bin directory, and the difference between obj directory, and the Debug version and Release versions of the difference between 2010-08-07

    1. On the bin directory and the obj directory bin directory to save the project generate the assembly after it has Debug and Release versions, corresponding to the folder to bin / Debug and bin / Release, this folder is the default output path, we ca

  • (R) linux source code analysis and comparative reading tools 2010-11-01

    Reprinted from: http://hi.baidu.com/likeadream/blog/item/7664bb349daf0049241f144c.html Windows source code under the reading tool Souce Insight by virtue of its ease of use and variety of programming languages, this area is undoubtedly the "take the

  • (R) linux source code analysis tools, and read more 2010-11-01

    Reprinted from: http://hi.baidu.com/likeadream/blog/item/7664bb349daf0049241f144c.html Reading tool for Windows source code Souce Insight With its ease of use and a variety of programming languages, no doubt in this area, "lead Big Brother." Lin

  • Xiang Jie Linux system PATH environment variable path modification method 2010-09-06

    Transfer from: http://os.51cto.com/art/200912/168844.htm Xiang Jie Linux system PATH environment variable path modification method Computer operating system, the brain is essential. The very rapid development of Linux, there is a trend catching up Mi

  • Directory and path to Linux 2011-05-07

    The definition of a relative path with absolute path Absolute path: the path from the root directory / start relative path: relative to the current working directory path Relative path and absolute path of the advantages and disadvantages Relative pa

  • Linux directory and path 2011-05-07

    Define relative path with absolute path Absolute path: the path from the root / start of the relative path: relative to the current working directory Relative path and absolute path of the advantages and disadvantages Relative path is simple, but onl

  • Oracle bin directory under Linux Command Introduction 2011-09-13

    Oracle bin directory under Linux Command Introduction $ ORACLE_HOME / bin (1) database management related bbed.exe block viewing and editing tool dbv.exe logic test tool to view data files to help: dbv help = y Dbv check the data file using the bad b

  • Linux System Tutorials --- Linux's DOS-like commands 2010-03-11

    Linux System Tutorials --- Linux's DOS-like commands Articles Category: Operating system Linux, DOS-like commands such as Table 2-1. Table 2-1 DOS-like command description Frequently used commands Brief English description Program directory ls Listin

  • Nagios Fetion Free SMS alarm system configuration linux 2010-05-31

    1, fetion20091117 wget http://www.it-adv.net/fetion/downng/library_linux.tar.gz wget http://www.it-adv.net/fetion/downng/fetion20090406003-linux.tar.gz wget http://www.it-adv.net/fetion/downng/fetion20091117-linux.tar.gz # Before installing the need

  • With the Google AJAX Search API on the Linux command appears on the Internet the number of rankings 2010-10-31

    With the Google AJAX Search API on the Linux command appears on the Internet the number of rankings This link: http://codingstandards.javaeye.com/blog/798861 (reprint, please indicate the source) Basic ideas Recently started to write "I used the Linu

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.566 (s). 12 q(s)