tejado / pgoapi

Pokemon Go API lib
Other
1.4k stars 445 forks source link

Python3 - ImportError: cannot import name 'protos' #63

Closed john-best closed 8 years ago

john-best commented 8 years ago
Python 3.5.1 (default, Mar  4 2016, 01:39:17)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pgoapi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/site-packages/pgoapi/__init__.py", line 19, in <module>
    from pgoapi.pgoapi import PGoApi
  File "/usr/local/lib/python3.5/site-packages/pgoapi/pgoapi.py", line 33, in <module>
    from pgoapi.rpc_api import RpcApi
  File "/usr/local/lib/python3.5/site-packages/pgoapi/rpc_api.py", line 39, in <module>
    from . import protos
ImportError: cannot import name 'protos'

I'm on Debian stretch running Python 3.5.1 with protobuf3.0.0b4. I'm not sure if there's something I'm missing or if I have installed the wrong dependency. Thanks!

john-best commented 8 years ago

Issue was because I was outside of the directory of pgoapi. For some reason I thought setup.py would have allowed system-wide access to the pgoapi library but it seems I was mistaken.

tejado commented 8 years ago

Problem is, that the protos wont be installed yet... stupid installer stuff... will be fixed soon

tejado commented 8 years ago

Should be fixed now. setup.py also installs the proto system-wide now.

john-best commented 8 years ago

Works on my machine :+1: