-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
pip install gcloud causes python to raise errors #1570
Comments
Came here to note this as well. This is almost certainly not an issue with this package, but I wasn't sure if the google/protobuf project was the right place either. Rolling back to |
Interestingly, the installation itself is not broken for me from a blank virtualenv:
|
@bendemaree you're right, I think my title was misleading -- the gcloud install actually works, but python (gracefully) fails whenever you run it, as you demonstrated. |
This was "fixed" by #1571 |
neither of the above solutions did anything for me. I installed every distribution of protobuf mentioned and couldn't get rid of the problem. Additionally, I uninstalled gcloud, which was what originally caused the problem to surface, and the problem still didn't go away. The pull request this issue links is of no help. No idea what those people are talking about. |
Can you provide a stacktrace indicating what has failed? |
apologies for the picture link; using tmux and having trouble copying and pasting text from the terminal |
This looks very familiar to #2038. Rather than removing every problem file, you should be able to |
Unfortunately, this is still happening. Tried various versions of protobuf and re-installing google cloud. My environment:
When using python or pip anywhere, this happens: root@1b99dfc34423:/workdir# python
Error processing line 2 of /usr/local/lib/python2.7/dist-packages/google_cloud_core-0.20.0-py2.7-nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 158, in addpackage
exec line
File "<string>", line 1, in <module>
KeyError: 'google'
Remainder of file ignored
Error processing line 2 of /usr/local/lib/python2.7/dist-packages/google_cloud_storage-0.20.0-py2.7-nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 158, in addpackage
exec line
File "<string>", line 1, in <module>
KeyError: 'google'
Remainder of file ignored
Error processing line 2 of /usr/local/lib/python2.7/dist-packages/googleapis_common_protos-1.3.5-nspkg.pth:
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 158, in addpackage
exec line
File "<string>", line 1, in <module>
KeyError: 'google'
Remainder of file ignored
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> |
@dominiek When other users have reported similar, they had an "incorrect" install of some packages that live in the It seems Before uninstalling lots of things from your default environment, spin up a virtual environment and see if the problem still persists by running:
|
Also, note that using docker doesn't obviate the need for virtualenv. You On Wed, Oct 19, 2016, 9:56 PM Danny Hermes [email protected] wrote:
|
I encountered this problem and it was caused by having https://pypi.python.org/pypi/google installed. Removing this package and reinstall'ing google-cloud resolved the issue (I verified this by reinstalling 'google' and the problem regressed). |
@brianrusso Unfortunately we don't have any affiliation with that project. |
Removing this package and reinstall'ing google-cloud resolved the issue (I verified this by reinstalling 'google' and the problem regressed). How did you uninstall it, my
Kindly help. |
You did a @namitapg I would try creating a fresh virtualenv to start with. You may be able to manually delete the google package from your current virtualenv's site-packages but I'm not sure that would resolve the issue. |
I did Our requirements.txt includes Thanks for your response. |
Glad to hear it's working! |
deleting all the files with name and path site-packages/googleapis*********** |
I just commented out the print statements in site.py - everything's working fine, and no more annoying errors messages |
(using a fresh conda env to demonstrate):
output:
After some trial and error, it looks like the current version of protobuf (3.0.0b2.post1) is causing the problem. Based on the solution to #1304, reverting to a prior version resolves it (or at least suppresses the error):
clean up:
The text was updated successfully, but these errors were encountered: