Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with pip install imposm.parser, header files not found #18

Open
shiro900 opened this issue Mar 16, 2016 · 8 comments
Open

Error with pip install imposm.parser, header files not found #18

shiro900 opened this issue Mar 16, 2016 · 8 comments

Comments

@shiro900
Copy link

I am using python 2.7 and I am trying to pip install imposm.parser.

The first thing I did was to install protobuf with pip install protobuf. That installed version 2.6.1 in C:\Python27\Lib\site-packages\google. Then I went here to download protoc-2.6.1-build2-windows-x86_32.exe which I renamed to protoc.exe and placed in C:\Python27\Lib\site-packages\google folder.

I then installed Microsoft Visual C++ 9.0 from here

Finally, I executed pip install imposm.parser and this is the error I get:

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

Edit: The header header file saying that is missing is from protobuf which I just installed with pip install protobuf. The file missing is right here in the github google/protobuf/stubs/common.h shouldn't it exist on my system since I installed with pip ? I don't understand...

@shiro900 shiro900 changed the title Error with pip install imposm.parser, header files found Error with pip install imposm.parser, header files not found Mar 16, 2016
@CTLocalGovTeam
Copy link

I have the same issue.

  • pip install protobuf
  • installed VCforPython27
  • downloaded the latest code from github and ran setup.py install

and i see the same error, "missing common.h"

@shiro900, were you ever successful in setting this up? I am doing on a windows 7 64-bit machine with 32-bit Python 2.7.10

@codergh
Copy link

codergh commented Jul 7, 2017

@shiro900

I also got the problem. were you ever successful in setting this up?
Or do you have any other method to solve this problem?

@stigbosmans
Copy link

stigbosmans commented Aug 1, 2017

Same problem here, did anyone find a solution yet?

@TimMcCauley
Copy link

For Ubuntu 16.04 I had to install google protobuf from source, instructions to be found here:
https://github.com/google/protobuf/blob/master/src/README.md

For OS X it will suffice if you install protobuf via brew install protobuf

@colmjude
Copy link

Thanks @TimMcCauley, that worked a treat for me.

@philippos86
Copy link

@TimMcCauley Thanks Tim for your comment. I had the same issue as @shiro900 , and your linked helped configuring on mac. However, on windows, I still face the same problem.
Basically, I work from cygwin terminal on Windows 7, and I miss the last command ldconfig.
Do you have any advice to solve this issue?

@TimMcCauley
Copy link

@philippos86
Copy link

@TimMcCauley I googled it already, apparently Idconfig is only for mac.
Also, the documentation says it is only for mac os or linux:
https://imposm.org/docs/imposm/latest/#
so I am not sure if it could be configured for windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants