Latest edit at 2021/04/18 (yyyy/mm/dd). May be outdated. Don’t forget to use your brain.
www.python.org and download the distribution of version equal or greater than 3.6. Get the executable installer that matches your OS architecture (or just x86 if in doubt). Link should be named Windows x86-64 executable installer or Windows x86 executable installer.python-3.8.6-amd64.exe or like that, where 3.8.6 part is the version and amd64/x86 is the architecture).Python is installed.
to reduce the installation impact on the OS. No adding the installation to PATH, no creating shortcuts, no nothing. Just the fresh copy of Python3 getting installed.
Get the recent TinGen version from https://github.com/eXhumer/TinGen
Code button and then on the Download ZIP link to get the TinGen itself.TinGen-main folder from the ZIP you got to some location on your PC (Desktop is fine. Root of any drive is fine. Any other place is fine).TinGen-main folder you just unzipped, Shift+Right Click on the empty space inside, select “Open Command Prompt here” or “Open PowerShell window here”.<full path to python.exe> -m venv venv(if you’ve followed the Python installation part above - c:\python390\python.exe -m venv venv. If you’ve added python installation to PATH in the installer - just python should suffice), press Enter, wait for it to complete.venv\scripts\python.exe -m pip install -r requirements.txt --prefer-binarycredentials.json file for your account.credentials.json you’ve just downloaded to the TinGen-main folder.venv\scripts\python.exe TinGen.py. In the browser window that opens select the Google account that has the access to the drive you want to index and grant it the access by clicking “Allow” - “Allow”. If you get “This app isn’t verified” page - click “Advanced” and “Go to venv\scripts\python.exe TinGen.py <tingen options> <folder_id> (folder_id being the part of URL after https://drive.google.com/drive/folders/ when you open your shared folder).running virtual environment (https://docs.python.org/3/tutorial/venv.html for more info) to prevent installing packages system-wide, so they don’t clutter the user profile. And so the packages that are installed already don’t interfere with TinGen working.
--prefer-binary pip flag is used to install the available binary packages in case some maintainers only provide the sources for the new version. So it does work without compiling dependencies. More frequently than without the flag, that is.
<full path to python.exe> -m venv venv)venv\scripts\python.exe to <full path to python.exe> (or just python.exe if it is added to PATH)git clone https://github.com/eXhumer/TinGen in the command prompt to download the latest version instead of Steps 1 and 2.run.bat), place TinGen invocation there (i.e. venv\scripts\python.exe TinGen.py <FolderID> --encrypt), run it with double-click. Removes the need to print those scary commands by hand. Makes runs repeatable (and automatable). You can even make a single .bat to run, say, rclone and then TinGen. Keywords to google for additional info: windows bat scripttaskschd.msc, press OK or Enter.windows scheduled tasks.If you get red text that contains distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/:
May be caused by using freshly released Python version that still doesn’t have pre-built libraries. Going back a minor version (i.e. from 3.9 to 3.8) should help you to avoid multiple-gigabyte download/install.
If you want to switch to another python version:
venv folder in the TinGen-mainIf you want to proceed with the recent version:
https://visualstudio.microsoft.com/downloads/, find the Tools for Visual Studio 2019 part, inside it find Build Tools for Visual Studio 2019 and download them.venv\scripts\python.exe -m pip install -r requirements.txt command again. Now it should proceed without those errors.