Closed venounan closed 8 years ago
Try brew install protobuf
without the --devel tag. It worked for me.
I get the same message, how would I go about uninstalling it to try to install it again without the --devel option?
try brew list
to see if the protobuf package is actually managed by homebrew. If it is listed there. then try brew uninstall protobuf
MBP:poketrainer ven$ brew list autoconf git openssl python automake libtool pkg-config readline gdbm node protobuf sqlite MBP:poketrainer ven$ brew uninstall protobuf Uninstalling /usr/local/Cellar/protobuf/3.0.0-beta-4... (336 files, 17M)
`MBP:poketrainer ven$ brew update && brew install protobuf Already up-to-date. ==> Downloading https://homebrew.bintray.com/bottles/protobuf-2.6.1.el_capitan.b ######################################################################## 100.0% ==> Pouring protobuf-2.6.1.el_capitan.bottle.5.tar.gz ==> Caveats Editor support and examples have been installed to: /usr/local/Cellar/protobuf/2.6.1/share/doc/protobuf
Python modules have been installed and Homebrew's site-packages is not in your Python sys.path, so you will not be able to import the modules this formula installed. If you plan to develop with these modules, please run: mkdir -p /Users/ven/Library/Python/2.7/lib/python/site-packages echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/ven/Library/Python/2.7/lib/python/site-packages/homebrew.pth ==> Summary 🍺 /usr/local/Cellar/protobuf/2.6.1: 121 files, 6.8M`
MBP:poketrainer ven$ python pokecli.py -i 1 Traceback (most recent call last): File "pokecli.py", line 37, in <module> from pgoapi import PGoApi File "/Users/ven/Desktop/Pokemon/poketrainer/pgoapi/__init__.py", line 16, in <module> raise PleaseInstallProtobufVersion3() pgoapi.exceptions.PleaseInstallProtobufVersion3
Hmm still a no-go.
I tried the pip install -r requirements.txt
because I think I forgot that step, and it returned this:
MBP:poketrainer dylan$ pip install -r requirements.txt Requirement already satisfied (use --upgrade to upgrade): geopy==1.11.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 1)) Collecting protobuf>=3.0.0a3 (from -r requirements.txt (line 2)) Using cached protobuf-3.0.0b4-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): requests==2.10.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 3)) Requirement already satisfied (use --upgrade to upgrade): s2sphere==0.2.4 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 4)) Requirement already satisfied (use --upgrade to upgrade): gpsoauth==0.3.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 5)) Collecting pyproj==1.9.5.1 (from -r requirements.txt (line 6)) Collecting python-gmaps==0.3.1 (from -r requirements.txt (line 7)) Using cached python_gmaps-0.3.1-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): Flask==0.11.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 8)) Collecting Jinja2==2.7.1 (from -r requirements.txt (line 9)) Collecting expiringdict==1.1.3 (from -r requirements.txt (line 10)) Requirement already satisfied (use --upgrade to upgrade): setuptools in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-25.1.0-py2.7.egg (from protobuf>=3.0.0a3->-r requirements.txt (line 2)) Requirement already satisfied (use --upgrade to upgrade): six>=1.9 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from protobuf>=3.0.0a3->-r requirements.txt (line 2)) Requirement already satisfied (use --upgrade to upgrade): future in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from s2sphere==0.2.4->-r requirements.txt (line 4)) Requirement already satisfied (use --upgrade to upgrade): pycryptodomex>=3.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from gpsoauth==0.3.0->-r requirements.txt (line 5)) Collecting pytz (from python-gmaps==0.3.1->-r requirements.txt (line 7)) Using cached pytz-2016.6.1-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): click>=2.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Flask==0.11.1->-r requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Flask==0.11.1->-r requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Flask==0.11.1->-r requirements.txt (line 8)) Requirement already satisfied (use --upgrade to upgrade): markupsafe in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Jinja2==2.7.1->-r requirements.txt (line 9)) Installing collected packages: protobuf, pyproj, pytz, python-gmaps, Jinja2, expiringdict Found existing installation: protobuf 2.6.1 Uninstalling protobuf-2.6.1: Exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames shutil.move(old, new) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/protobuf/__init__.py'
The end exception is:
Exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/utils/init.py", line 267, in renames shutil.move(old, new) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/protobuf/init.py'
I just uninstalled protobuf through brew, and then tried running the requirements.txt again, and it looks like It's still finding protobuf 2.6.1. Do you know how I can find/uninstall that. I'm sorry I know this is pretty off topic.
DRIVE_LETTER:(Python27 Path)\Lib\site-Packages\
all you installs into python for libraries should be there
Though this is for windows... if you are using Lunix... sorry I can't help you
I resolved it by nuking my python installation and reinstalling
When I try and run the code I got the following return:
MBP:poketrainer ven$ python pokecli.py -i 1 Traceback (most recent call last): File "pokecli.py", line 37, in <module> from pgoapi import PGoApi File "/Users/ven/Desktop/Pokemon/poketrainer/pgoapi/__init__.py", line 16, in <module> raise PleaseInstallProtobufVersion3() pgoapi.exceptions.PleaseInstallProtobufVersion3
so I ran "brew update && brew install --devel protobuf"
and got:
Updated Homebrew from 1455aa3 to 9f6cb8e. Updated 1 tap (homebrew/core). ==> New Formulae osm-gps-map ==> Updated Formulae aide commandbox libcouchbase sane-backends ansiweather corectl luvit swagger-codegen appscale-tools diff-pdf offlineimap syncthing aws-sdk-cpp dpkg pdf2htmlex voldemort awscli homebank poppler youtube-dl cake idris pyenv collectd kobalt rakudo-star ==> Deleted Formulae folly Warning: protobuf-3.0.0-beta-4 already installed
But the poketrainer still won't run and returns the same message.