Homebrew-App, die kein Python-Paket verwendet

528
fabian789

Ich habe duply mit Homebrew installiert und versucht, ein Backup für Google Drive zu erstellen. Dies führt zu dem folgenden Fehler:

BackendException: Für das Google Docs-Backend ist die Python Client Library von Google Data APIs erforderlich

Mit Blick auf duplicitiy ‚s Quelle ( duplicitiy ist das, was zugrunde liegt duply ), fand ich, dass dies entweder durch verursacht wird, import atomoder import gdata, zwei Python - Pakete. Ich habe jedoch beide installiert, und das Ausführen import gdatain Pythons REPL funktioniert ohne Probleme.

Ich habe festgestellt, dass Duplizität bei installiert ist

/usr/local/Cellar/duplicity/0.6.24/lib/python2.7/site-packages/duplicity 

während die Python-Pakete bei sind

/usr/local/lib/python2.7/site-packages/gdata 

Es sieht also so aus, als habe Duplizität irgendwie eine eigene Python-Distribution bekommen? Ist das Standardverfahren? Vor allem aber: Wie kann ich meine Python-Pakete doppelt finden?

0

1 Antwort auf die Frage

1
SDude

It happens because somewhat the atom package is not in the path. This could be due to several reasons depending on your Python installation method. This quick workaround worked for me... Just add this two lines...

import sys sys.path.append('/usr/local/lib/python2.7/site-packages/') 

...on top of this duplicity's gdocsbackend.py file:

/usr/local/Cellar/duplicity/0.6.25/libexec/lib/python2.7/site-packages/duplicity/backends/gdocsbackend.py


This way you are telling the python file to look for the atom module in the /usr/local/lib/python2.7/site-packages/ folder, where it really is.


If you want You can double-check where your atom module is located... Open Python's REPL and type:

> import atom > print atom.__file__ 

You'll get the location that you need to append to your path...

Hope it helps