pip install imposm.parser出错,找不到头文件

时间:2016-03-16 06:03:42

标签: python c++

我正在使用python 2.7,我正在尝试pip install imposm.parser

我做的第一件事是用pip install protobuf安装protobuf。在C:\Python27\Lib\site-packages\google中安装了2.6.1版本。然后我去了here下载protoc-2.6.1-build2-windows-x86_32.exe,我将其重命名为protoc.exe并放在C:\Python27\Lib\site-packages\google文件夹中。

然后我从here

安装了Microsoft Visual C ++ 9.0

最后,我执行了pip install imposm.parser,这是我得到的错误:

running build_ext
building 'imposm.parser.pbf.OSMPBF' extension
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\imposm
creating build\temp.win-amd64-2.7\Release\imposm\parser
creating build\temp.win-amd64-2.7\Release\imposm\parser\pbf
C:\Users\Shiro\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -C:\Python27\include -IC:\Python27\PC /Tpimposm/parser/pbf/osm.cc Fobuild\temp.win-amd64-2.7\Release\imposm/parser/pbf/osm.obj
  osm.cc
C:\Users\Shiro\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\shiro\appdata\local\temp\pip-build-jel4jl\imposm.parser\imposm\parser\pbf\osm.pb.h(9) : fatal error C1083: Cannot open include file: 'google/protobuf/stubs/common.h': No such file or directory
error: command '"C:\Users\Shiro\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2

修改:标题文件缺失的标题文件来自protobuf,我刚刚安装了pip install protobuf。缺少的文件就在github google/protobuf/stubs/common.h中,因为我安装了pip,我的系统上是否应该存在该文件?我不明白......

0 个答案:

没有答案