XericZephyr / prototext

ProtoText is a efficient python library, offering dict-like operations and text format serialization to google protobuf objects.
19 stars 3 forks source link

pip install fails in conda environment #1

Open JarnoRFB opened 7 years ago

JarnoRFB commented 7 years ago

If I create a new environment with conda and try to install the package like so

$ conda create -n proto python=3.6
$ source activate proto
$ pip install ProtoText

I get the following error:

Collecting ProtoText
  Using cached ProtoText-0.3.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-p3tekn16/ProtoText/setup.py", line 1, in <module>
        from ProtoText import __version__
      File "/tmp/pip-build-p3tekn16/ProtoText/ProtoText/__init__.py", line 1, in <module>
        from .models import MessageWrapper
      File "/tmp/pip-build-p3tekn16/ProtoText/ProtoText/models.py", line 3, in <module>
        from google.protobuf.text_format import Merge
    ModuleNotFoundError: No module named 'google'

hence I think protobuf should be added as a dependency.

But even after $ conda install protobuf I get

Collecting ProtoText
  Using cached ProtoText-0.3.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-cqv_o2uo/ProtoText/setup.py", line 1, in <module>
        from ProtoText import __version__
      File "/tmp/pip-build-cqv_o2uo/ProtoText/ProtoText/__init__.py", line 2, in <module>
        from .hook_helper import register_class_hook, deregister_class_hook
      File "/tmp/pip-build-cqv_o2uo/ProtoText/ProtoText/hook_helper.py", line 2, in <module>
        import __builtin__
    ModuleNotFoundError: No module named '__builtin__'
XericZephyr commented 6 years ago

Oh. Thanks for the report. I have not tested it with python 3 yet. Let me try to fix it.