Skip to content
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

How to install on Windows? #63

Closed
gilesknap opened this issue Mar 5, 2019 · 9 comments
Closed

How to install on Windows? #63

gilesknap opened this issue Mar 5, 2019 · 9 comments
Labels

Comments

@gilesknap
Copy link
Owner

@gilesknap gilesknap commented Mar 5, 2019

I'm not too familiar with python environments on Windows - I can make it work in pycharm but need independent instructions.

@gilesknap
Copy link
Owner Author

@gilesknap gilesknap commented Mar 5, 2019

The following worked for me:
(it may b worth adding C:\Users<Username>\AppData\Local\Programs\Python\Python36\ to the path instead of using the full path every time - not sure why python installer does not do this?)

  • Install python from https://www.python.org/ftp/python/3.6.7/python-3.6.7-amd64.exe
  • mkdir myInstallDir
  • cd myInstallDir
  • C:\Users\giles\AppData\Local\Programs\Python\Python36\python.exe -m pip install pipenv
  • C:\Users\giles\AppData\Local\Programs\Python\Python36\python.exe -m pipenv install gphotos-sync
  • C:\Users\giles\AppData\Local\Programs\Python\Python36\python.exe -m pipenv install python-magic-bin
  • C:\Users\giles\AppData\Local\Programs\Python\Python36/python.exe -m pipenv run gphotos-sync C:\MyPhotosFolder

@gilesknap gilesknap closed this Mar 5, 2019
@mathmul
Copy link

@mathmul mathmul commented Sep 24, 2019

the last command (python -m pipenv run gphotos-sync C:\MyPhotosFolder) failed in my case:

C:\Python\Python37>python -m pipenv run gphotos-sync C:\MyPhotosFolder
missing or bad secrets file: C:\Users\8000plus\AppData\Local\gphotos-sync\gphotos-sync\client_secret.json
09-24 15:29:50
Process failed.
Traceback (most recent call last):
  File "c:\users\8000plus\.virtualenvs\python37-q9pyk0hv\lib\site-packages\gphotos\authorize.py", line 41, in __init__
    with secrets_file.open('r') as stream:
  File "C:\Python\Python37\Lib\pathlib.py", line 1193, in open
    opener=self._opener)
  File "C:\Python\Python37\Lib\pathlib.py", line 1046, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\8000plus\\AppData\\Local\\gphotos-sync\\gphotos-sync\\client_secret.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\8000plus\.virtualenvs\python37-q9pyk0hv\lib\site-packages\gphotos\Main.py", line 372, in main
    self.setup(args, db_path)
  File "c:\users\8000plus\.virtualenvs\python37-q9pyk0hv\lib\site-packages\gphotos\Main.py", line 224, in setup
    int(args.max_retries)
  File "c:\users\8000plus\.virtualenvs\python37-q9pyk0hv\lib\site-packages\gphotos\authorize.py", line 54, in __init__
    exit(1)
  File "c:\users\8000plus\.virtualenvs\python37-q9pyk0hv\lib\site.py", line 397, in __call__
    raise SystemExit(code)
SystemExit: 1
09-24 15:29:50 Done.

How to proceed?

@gilesknap
Copy link
Owner Author

@gilesknap gilesknap commented Sep 24, 2019

You need to create a client secret file and place it in C:\Users\8000plus\AppData\Local\gphotos-sync\gphotos-sync\.

See the section on 'valid client id' in https://github.com/gilesknap/gphotos-sync or have a read of https://www.linuxuprising.com/2019/06/how-to-backup-google-photos-to-your.html

Cheers,
giles.

@miketunes
Copy link

@miketunes miketunes commented Apr 3, 2020

I have version 2.10.4 installed on my windows, how do I update to 2.14.0 with this method? I re-ran the command but that didn't help. Do I need to delete something first?

@gilesknap
Copy link
Owner Author

@gilesknap gilesknap commented Apr 3, 2020

To be sure pipenv gets the latest you can do.
pipenv -rm
Before redoing the above.
Make sure you cd to the directory first.

@GreatApo
Copy link

@GreatApo GreatApo commented Sep 22, 2020

To be sure pipenv gets the latest you can do.
pipenv -rm

It is pipenv --rm

For new users, when creating the client secret file, do not select the "other" option but "Desktop app" (as mentioned here)

@gilesknap
Copy link
Owner Author

@gilesknap gilesknap commented Sep 23, 2020

@GreatApo thanks!

@computerartclub
Copy link

@computerartclub computerartclub commented May 9, 2021

Any idea how long I should expect this to take? I entered in the final command into Command Prompt about an hour ago and still nothing has happened since then, no error, no progress indication, no link to request that I log in to Google Photos, and no photos appearing in the folder. My Google Photos account has about 950+ GB of photos and videos in it, so I am not sure if that is partly why it is slow. Thanks!

@gilesknap
Copy link
Owner Author

@gilesknap gilesknap commented May 9, 2021

Indexing takes quite a while and varies by library size. But you should see the indexing ... prompt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants