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

How to use release protobuf 3.0.0-alpha-3? #589

Closed
hamburml opened this issue Jul 11, 2015 · 5 comments
Closed

How to use release protobuf 3.0.0-alpha-3? #589

hamburml opened this issue Jul 11, 2015 · 5 comments

Comments

@hamburml
Copy link

Hello!

I am writing a Blender-Add-On in Python which needs to communicate with a C++-Application. The Blender-Add-On is creating a 3D Gemoetry and the C++-Application is creating some textures for it. For IPC I found protobuf and would like to use it (http://stackoverflow.com/questions/6915191/simple-ipc-between-c-and-python-cross-platform).

I searched for protobuf and found the github-repo and the google dev-page. The examples look straight forward and are easy to understand. Now I thought I will try a simple example for Python and C++.
So far, so good...

I am using Visual Studio 2013 Community, Windows 8.1 x64 and python 3. I found out that protobuf v3 (alpha) supports python 3. So I think I need to compile it for python myself? (afaik on the google dev-page I can only download protobuf 2.6).
I also found https://github.com/google/protobuf/releases/tag/v3.0.0-alpha-3

There is a release for python and for cpp. Can I use them instead of compiling it myself?
How do I use the protobuf-python-3.0.0-alpha-3.zip release correctly? The README says that I should build and run the tests. If I do python setup.py test then I get the error that Visual C++ 10.0 is required (which is Visual Studio 2010). After googling I found that the same error comes when building something for python 2.7. Do I really need to install VS 2010 for that? Can I skip build and run tests?

Sorry if that are really basic questions but I am stuck and would love to use a simple interchange format instead of creating my own.

Thanks!

@TeBoring
Copy link
Contributor

For protoc compiler, you don't need to compile it by your self. Just
download it from
https://github.com/google/protobuf/releases/download/v3.0.0-alpha-3/protoc-3.0.0-alpha-3-win32.zip
For python runtime, you can download the egg from
https://pypi.python.org/pypi/protobuf/3.0.0a3

2015-07-11 5:26 GMT-07:00 Michael notifications@github.com:

Hello!

I am writing a Blender-Add-On in Python which needs to communicate with
a C++-Application. The Blender-Add-On is creating a 3D Gemoetry and the
C++-Application is creating some textures for it. For IPC I found protobuf
and would like to use it (
http://stackoverflow.com/questions/6915191/simple-ipc-between-c-and-python-cross-platform
).

I searched for protobuf and found the github-repo and the google dev-page.
The examples look straight forward and are easy to understand. Now I
thought I will try a simple example for Python and C++.
So far, so good...

I am using Visual Studio 2013 Community, Windows 8.1 x64 and python 3.
I found out that protobuf v3 (alpha) supports python 3. So I think I need
to compile it for python myself? (afaik on the google dev-page I can only
download protobuf 2.6).
I also found
https://github.com/google/protobuf/releases/tag/v3.0.0-alpha-3

There is a release for python and for cpp. Can I use them instead of
compiling it myself?
How do I use the protobuf-python-3.0.0-alpha-3.zip release correctly? The
README says that I should build and run the tests. If I do python setup.py
test then I get the error that Visual C++ 10.0 is required (which is Visual
Studio 2008). After googling I found that the same error comes when
building something for python 2.7. Do I really need to install VS 2008 for
that? Can I skip build and run tests?

Sorry if that are really basic questions but I am stuck and would love to
use a simple interchange format instead of creating my own.

Thanks!


Reply to this email directly or view it on GitHub
#589.

@hamburml
Copy link
Author

Thanks!
The py version of the python runtime egg is for 2.7. Is it compatible to 3.x?

Am I right that I need to build the libprotobuf.lib and to link it to use protobuf in a c++-application?

@TeBoring
Copy link
Contributor

To my understanding, protobuf is not fully compatible to 3.x yet. @haberman
to confirm.
To use c++ implementation, you need to build libprotobuf. However, the
python c++ implementation is not supported in windows. I am not sure it can
work.

2015-07-11 6:11 GMT-07:00 Michael notifications@github.com:

The py version of the python runtime egg is for 2.7. Is it compatible to
3.x?

Am I right that I need to build the libprotobuf.lib and to link it to use
protobuf in a c++-applic

Am I right that I need to build the libprotobuf.lib and to link it to use
protobuf in a c++-application?


Reply to this email directly or view it on GitHub
#589 (comment).

@hamburml
Copy link
Author

Looks like it's working!

I was able to create a Visual Studio 2013 project, which uses libprotobuf and creates a person (from the addressbook-example on the google-dev-page). I serialize the person to a file on the harddisk, load the file in python via open and call the ParseFromString(). It only worked after I omitted the last byte of the just red file which is the CRLF.
Now I only need to send the string via named pipes and I am good to go 👍

Why do you say that the python c++ implementation is not supported in windows?
There is a vsprojects-folder which aims directly to visual studio and windows? Maybe I just don't understand what you mean.

Thanks again!

@TeBoring
Copy link
Contributor

2015-07-11 7:37 GMT-07:00 Michael notifications@github.com:

Looks like it's working!

I was able to create a Visual Studio 2013 project, which uses libprotobuf
and creates a person (from the addressbook-example on the google-dev-page).
I serialize the person to a file on the harddisk, load the file in python
via open and call the ParseFromString().

Why do you say that the python c++ implementation is not supported in
windows?

We didn't test c++ implementation on windows. So I am not sure whether it
can work. We will make sure we test it in future release.

There is a vsprojects-folder which aims directly to visual studio and
windows? Maybe I just don't understand what you mean.

Thanks again!


Reply to this email directly or view it on GitHub
#589 (comment).

@xfxyjwf xfxyjwf closed this as completed Jan 21, 2016
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

3 participants