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

I can't find messages_pb2.py #1030

Open
Roodgerr opened this issue Sep 21, 2020 · 3 comments
Open

I can't find messages_pb2.py #1030

Roodgerr opened this issue Sep 21, 2020 · 3 comments

Comments

@Roodgerr
Copy link

I install Bigartm as it written on site
In trying to import module artm i get this error:
ImportError: cannot import name 'messages_pb2' from partially initialized module 'artm.wrapper' (most likely due to a circular import) (C:\Users\rust0\anaconda3\envs\coursera_d\lib\site-packages\bigartm10-0.10.1-py3.8.egg\artm\wrapper_init_.py)

I followed the indicated path, but not found the file messages_pb2.py
image
image

@bt2901
Copy link
Contributor

bt2901 commented Sep 22, 2020

The messages_pb2.py file is not included in this Github repository. It is generated as a part of the installation, but apparently this has failed in your case (for some reason).

Could you make sure that protocol buffers are installed correctly? I'm not sure, but I think that you should be able to run protoc.exe in a command prompt, and it should list various flags in response.

The workaround that works in some cases is running python setup.py build and python setup.py install. This should generate messages_pb2.py. I cannot say where it will be located offhand. You might need to move it manually to the site-packages folder.

@sequoiarose
Copy link

sequoiarose commented Jan 21, 2021

bigartm error

Hello! I am also having the same problem (on Windows 10 with both 0.10.1 and 0.9.2). I ran python setup.py install to initially install the package after downloading and extracting the zip files from the repository. When I ran python setup.py build , I got the error "ValueError: No protobuf compiler executable was found!", however I have protobuf (v 4.0.0) installed in python (via pip). It looks like julia is being called as well, which I dont think is supposed to happen. When I run protoc.exe, the error is "python: can't open file 'protoc.exe': [Errno 2] No such file or directory". Any ways to work around this? Thanks!

@sequoiarose
Copy link

bigartm error

Hello! I am also having the same problem (on Windows 10 with both 0.10.1 and 0.9.2). I ran python setup.py install to initially install the package after downloading and extracting the zip files from the repository. When I ran python setup.py build , I got the error "ValueError: No protobuf compiler executable was found!", however I have protobuf (v 4.0.0) installed in python (via pip). It looks like julia is being called as well, which I dont think is supposed to happen. When I run protoc.exe, the error is "python: can't open file 'protoc.exe': [Errno 2] No such file or directory". Any ways to work around this? Thanks!

SOLUTION:

The source of this problem for me was an incorrect installation of protobuf. Protobuf was installed originally only through pip, but this was an incorrect installation. To correctly install protobuf these are the steps I took:

  1. First install the protoc binaries for your specific operating system, found on the protobuf releases page.
  2. Add protoc/bin to your system path variables
  3. Download the protobuf source code zip from the protobuf releases page (or you may be able to just choose the language you are using, I only tried the "source code" one and that worked for me)
  4. in a command prompt (I used anaconda 3), run the protobuf (NOT protoc) setup.py file: python setup.py build then python setup.py install then python setup.py test
    Now protobuf and protoc are correctly installed, so the bigartm installation can continue
    -general instructions: https://github.com/protocolbuffers/protobuf
    -releases: https://github.com/protocolbuffers/protobuf/releases

From here, to correctly install bigartm:

  1. assuming you have downloaded the binaries, run python setup.py build followed by python setup.py install

If you have a protobuf installation error like I had, you will not get any errors when the bigartm setup.py install is ran, only when build is ran or when you try to import artm for the first time.

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