Closed odoncaoa closed 10 years ago
So, a viably compete install command set is as follows:
sudo apt-get install python-stdeb sudo apt-get install python-pip sudo pip install docopt==0.6.1 sudo pypi-install gsync
Slainte Douglas
Im doing the same on a fresh Mint install. In addition to the packages already mentioned, I had to install these manually as well:
sudo pypi-install oauth2 sudo pypi-install oauth2client sudo pypi-install python-gflags
and im still getting this error
willie@willie-laptop ~ $ gsync -vrn Calibre\ Library/ drive:///Calibre\ Library
Traceback (most recent call last):
File "/usr/bin/gsync", line 146, in
I get the same error trying to install on Rasberian Wheezy on Raspberry Pi
Hi, thanks for the info. The positional_parameters... issue has been fixed in 0.1.1, but I haven't repackaged for pypi yet. I am having dependency issues with pypi on some systems, which is why docopt is not installed or an adequate version is not installed. I'll look into these and get a new 0.1.1 package uploaded to pypi.
One issue I'm having in particular, is that client.json is not in the same place on all systems and is hard to locate when used within a python chroot.
I have made a fix I hope will work (adding version specification for docopt in the setup.py file). I may need to implement a setup.py script that uses setuptools instead of distutils if the packages are still not auto installed.
There is now a 0.1.1 version available on pypi.
That got me past the issue above, but then now i get
Error: No module named http
it looks like this install isn't even attempting to install dependencies. Ill give it a shot with easyinstall and see if i fare any better.
I cloned the repo and tried the easy install and i got the same result. Its like dependencies are being ignored completely.
I ran these two based on the setup.py
sudo pypi-install httplib2 sudo pypi-install urllib3
They installed, but still can't find the http module
I have been reading up on setuptools and distutils, both modules used for running setup() within the setup.py scripts. It seems that setuptools provides the functionality for automatic resolution of dependencies, while the other (distutils) doesn't. Currently, setup.py is configured using distutils, which is shipped with python. setuptools is only available via pypi. So there is a catch 22. To get automatic resolution of dependencies, the system needs to already have setuptools installed, or the setup.py will fail to run. To install without requiring setuptools present results in other modules not being automatically installed.
From further reading, it does seem that there are hacks people have included in their setup.py scripts to download and install setuptools before dynamically importing it once it is installed. I'll look into this in more detail when I get closer to a 1.0 release.
I have however, found that using easy_install instead of pypi-install seems to work reliably. Funnily enough, easy_install is provided by setuptools, so actually performs the dependency resolution. I have updated the documentation installation instructions:
$ sudo apt-get install python-setuptools
$ sudo easy_install --verbose gsync
Hope this helps!
Anyone using python for more than a day has setup tools installed so I don't think you have much to worry about going that direction. IMHO, the gain in dependency resolution is well worth the switch
I will definitely look into it asap. Need to understand how it works first. There are some subtle differences in the parameters passed to setup().
I found an alternative installation approach. Any change this works for you (this being Debian specific):
Get easy_install....
$ sudo apt-get install python-setuptools
Use easy_install to install pip...
$ sudo easy_install --verbose pip
Use pip to install gsync...
$ sudo pip install gsync
Hopefully that works?
good progress, but not quite yet..
willie@willie-laptop ~ $ gsync -vrn Calibre\ Library/ drive:///Calibre\ Library Authorization is required to access your Google Drive. Navigate to the following URL: [big honkin url to google] Type in the received code: [my code] Error: No module named discovery willie@willie-laptop ~ $ sudo pip install discovery Downloading/unpacking discovery Could not find any downloads that satisfy the requirement discovery Cleaning up... No distributions at all found for discovery Storing complete log in /home/willie/.pip/pip.log willie@willie-laptop ~ $ sudo pip install apiclient Requirement already satisfied (use --upgrade to upgrade): apiclient in /usr/lib/python2.7/dist-packages Cleaning up... willie@willie-laptop ~ $ sudo pip install apiclient --upgrade Requirement already up-to-date: apiclient in /usr/lib/python2.7/dist-packages Cleaning up... willie@willie-laptop ~ $ sudo pip install apiclient.discovery --upgrade Downloading/unpacking apiclient.discovery Could not find any downloads that satisfy the requirement apiclient.discovery Cleaning up... No distributions at all found for apiclient.discovery Storing complete log in /home/willie/.pip/pip.log
Ah, I think this is similar to a problem I was having when I first started the project. Google have kindly named the apiclient after an already existing python module called "apiclient". In the end, I had to install something completely different, which predates the setup.py file. I'll figure out what the Google version is called and update the setup.py script.
On Wed, Oct 2, 2013 at 5:55 AM, Steel City Phantom <notifications@github.com
wrote:
good progress, but not quite yet..
willie@willie-laptop ~ $ gsync -vrn Calibre\ Library/ drive:///Calibre\ Library Authorization is required to access your Google Drive. Navigate to the following URL: [big honkin url to google] Type in the received code: [my code] Error: No module named discovery willie@willie-laptop ~ $ sudo pip install discovery Downloading/unpacking discovery Could not find any downloads that satisfy the requirement discovery Cleaning up... No distributions at all found for discovery Storing complete log in /home/willie/.pip/pip.log willie@willie-laptop ~ $ sudo pip install apiclient Requirement already satisfied (use --upgrade to upgrade): apiclient in /usr/lib/python2.7/dist-packages Cleaning up... willie@willie-laptop ~ $ sudo pip install apiclient --upgrade Requirement already up-to-date: apiclient in /usr/lib/python2.7/dist-packages Cleaning up... willie@willie-laptop ~ $ sudo pip install apiclient.discovery --upgrade Downloading/unpacking apiclient.discovery Could not find any downloads that satisfy the requirement apiclient.discovery Cleaning up... No distributions at all found for apiclient.discovery Storing complete log in /home/willie/.pip/pip.log
— Reply to this email directly or view it on GitHubhttps://github.com/iwonbigbro/gsync/issues/14#issuecomment-25513322 .
Try installing this module instead: https://github.com/iwonbigbro/gsync/commit/560e3e1e2b0e698f12d7e1ce2501220417b360a9
google-api-python-client
On Wed, Oct 2, 2013 at 8:35 AM, Craig iwonbigbro@gmail.com wrote:
Ah, I think this is similar to a problem I was having when I first started the project. Google have kindly named the apiclient after an already existing python module called "apiclient". In the end, I had to install something completely different, which predates the setup.py file. I'll figure out what the Google version is called and update the setup.py script.
On Wed, Oct 2, 2013 at 5:55 AM, Steel City Phantom < notifications@github.com> wrote:
good progress, but not quite yet..
willie@willie-laptop ~ $ gsync -vrn Calibre\ Library/ drive:///Calibre\ Library Authorization is required to access your Google Drive. Navigate to the following URL: [big honkin url to google] Type in the received code: [my code] Error: No module named discovery willie@willie-laptop ~ $ sudo pip install discovery Downloading/unpacking discovery Could not find any downloads that satisfy the requirement discovery Cleaning up... No distributions at all found for discovery Storing complete log in /home/willie/.pip/pip.log willie@willie-laptop ~ $ sudo pip install apiclient Requirement already satisfied (use --upgrade to upgrade): apiclient in /usr/lib/python2.7/dist-packages Cleaning up... willie@willie-laptop ~ $ sudo pip install apiclient --upgrade Requirement already up-to-date: apiclient in /usr/lib/python2.7/dist-packages Cleaning up... willie@willie-laptop ~ $ sudo pip install apiclient.discovery --upgrade Downloading/unpacking apiclient.discovery Could not find any downloads that satisfy the requirement apiclient.discovery Cleaning up... No distributions at all found for apiclient.discovery Storing complete log in /home/willie/.pip/pip.log
— Reply to this email directly or view it on GitHubhttps://github.com/iwonbigbro/gsync/issues/14#issuecomment-25513322 .
So close i can taste it.
willie@willie-laptop ~ $ gsync -vr --stats --debug Calibre\ Library drive:///Calibre\ Library
DEBUG: /usr/local/bin/gsync:152:
It looks like its finding the folder on Drive, but not anything on my laptop, therefore copying nothing.
DEBUG: libgsync/crawler.py:146:run(): Enumerating: Calibre Library
This is a bug I have fixed, whereby local directories are not recursed. It was introduced in a fix made in relation to another issue. I am currently going through some stabilisation at the moment, so I won't keep you waiting much longer. I am reworking filename handling to fix a filename encoding issue. Once that is fixed, I will role out 0.1.4, which has the new setup.py using setuptools. :-)
I have just release 0.1.4 on pypi. It now uses setuptools, so if you install using pip, it installs everything needed.
SUCCESS!!! Uploaded the folder just like rsync. Haven't tried downloading yet but it looks good. When I installed the update, it also verified dependencies. Looks good man, thanks.
Excellent!
Upon successful installation of gsync via the prescribed commands: sudo apt-get install python-stdeb sudo pypi-install gsync
Attempting to get more info about the command attribs, yielded:
odoncaoa@killincoole$ gsync --help Traceback (most recent call last): File "/usr/bin/gsync", line 7, in
from docopt import docopt
ImportError: No module named docopt
Trying to narrow down the problem, line 7 of gsync was commented out:
from docopt import docopt
Which then provided specific info regarding the missing element: odoncaoa@killincoole$ gsync --help Traceback (most recent call last): File "/usr/bin/gsync", line 131, in
args = docopt(doc, version = version, options_first = True)
NameError: name 'docopt' is not defined
Then, attempted to install 'docopt', but found that it lives elsewhere:
odoncaoa@killincoole$ sudo apt-get install docopt Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package docopt
Found docopt at: https://pypi.python.org/pypi/docopt/0.1 https://github.com/halst/docopt
And, downloaded and installed: /usr/share/pyshared odoncaoa@killincoole$ ll | grep doc lrwxrwxrwx 1 root root 10 Sep 27 20:14 docopt -> docopt-0.1/ drwxr-xr-x 3 root root 4096 Apr 10 2012 docopt-0.1/
However, unless one finds the install instructions, at 'https://github.com/docopt/docopt', the problem persists: sudo pip install docopt==0.6.1
Once finally installed, then: odoncaoa@killincoole$ ll /usr/local/lib/python2.7/dist-packages/docopt* -rw-r--r-- 1 root staff 19946 Sep 27 20:43 /usr/local/lib/python2.7/dist-packages/docopt.py -rw-r--r-- 1 root staff 24197 Sep 27 20:43 /usr/local/lib/python2.7/dist-packages/docopt.pyc
/usr/local/lib/python2.7/dist-packages/docopt-0.6.1-py2.7.egg-info: total 48 drwxr-sr-x 2 root staff 4096 Sep 27 20:43 ./ drwxrwsr-x 9 root staff 4096 Sep 27 20:43 ../ -rw-r--r-- 1 root staff 1 Sep 27 20:43 dependency_links.txt -rw-r--r-- 1 root staff 86 Sep 27 20:43 installed-files.txt -rw-r--r-- 1 root staff 21462 Sep 27 20:43 PKG-INFO -rw-r--r-- 1 root staff 651 Sep 27 20:43 SOURCES.txt -rw-r--r-- 1 root staff 7 Sep 27 20:43 top_level.txt
Until, finally: odoncaoa@killincoole$ gsync --help gsync version 0.1.0
Copyright (C) 2013 Craig Phillips. All rights reserved. ... -h, --help show this help
See https://github.com/iwonbigbro/gsync for updates, bug reports and answers
Thus, it would appear that some extra checking needs to be done in the installation procedures in order to insure that 'docopt' also gets installed; if it was not already present before.
Craig, you should be aware (if you weren't already) that '-h' has 2 assignments, as well:
-h, --help show this help -h, --human-readable output numbers in a human-readable format
Slainte,
Douglas Donahue