木木的布劳格

  • 首页
  • 学无止尽
  • 愉悦生活
  • 中医
  • 软件
  • 单反摄影
  • 收藏的软件
  • About Me
木木的布劳格
记录生活点滴的静默博客
  1. 首页
  2. Python
  3. 正文

Python 2.7.1配合VS2010时的一个小问题

7月 6, 2014 1622点热度 2人点赞 0条评论

在安装一些需要编译的python包的时候,如pcapy,如果用的是Python 2.7.1+VS2010的话,输入完python setup install以后,应该会遇到以下的问题。

1. Unable to find vcvarsall.bat
解决方法:打开C:\Python27\Lib\distutils\msvc9compiler.py,找到if VERSION < 8.0:, 在这行前面加上VERSION = 10.0

2. pcapdumper.cc(12) : fatal error C1083: Cannot open include file: 'pcap.h': No such file or directory
解决办法:装一下winpcap的开发包,把include和lib目录里面的文件放到VC的同名目录里面

3. build\temp.win32-2.7\Release\pcapy.pyd.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
error: command 'mt.exe' failed with exit status 31
解决办法:由于vs2010的link.exe的参数稍微有些改变,所以在link的时候没有生成manifest文件,自然mt.exe找不到这个文件。只需要在msvc9compiler.py里面搜索一下MANIFESTFILE,然后在他上面加一行ld_args.append('/MANIFEST'),保存就OK了。

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: python VS2010
最后更新:6月 19, 2018

chat

这个人很懒,什么都没留下

点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复
标签聚合
序列号 PHP windows wm c# python win10 激活
广告
分类目录
  • C sharp
  • Delphi
  • Python
  • VPS
  • 中医
  • 伤寒论
  • 其他
  • 单反摄影
  • 学无止尽
  • 工作相关
  • 愉悦生活
  • 未分类
  • 软件

COPYRIGHT © 2023 木木的布劳格. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang