error: Python was built with Visual Studio 2003

在windows上安装rdflib2.4.0的时候出现如下错误:

Python was built with Visual Studio 200*” 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.

在google之后,找到网上的解决方法,如下:

Python for Windows is built using Visual Studio 2003; however the Bison-generated parser does not seem to generate C code that is compatible with this compiler. Therefore, it is recommended that gcc be installed, either through cygwin or by downloading MinGW. More details can be found on this page , but we will also summarize it here, assuming we take the cygwin route.

1. Install Python 2.5 , Windows Installer download is fine.

2. Download and run cygwin setup , making sure to include to following packages (No need to install the version of Python that comes with cygwin):

  • gcc-mingw
  • gcc-mingw-core
  • gcc-mingw-g++
  • make

3. Add [cygwin dir]/bin to PATH.

4. In order to ensure that gcc is used for building extensions, create a file [Python 2.5 dir]/lib/distutils/distutils.cfg :

  
[
build
]

  compiler
= mingw32

5. Download RDFLib release version or source .

6. Run rdflib/setup.py install.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值