Use Anki without admin access to computer

Dear Anki community
I have just started using Anki and I can’t believe I haven’t come across this software earlier. Unfortunately I do not have admin access to my work PC and so cannot install Anki there. There are some courses that I need to follow at work for which Anki would be very useful. The company’s IT department won’t install Anki as it is not in the Approved list of softwares for the company.
Could you please advise how I can use Anki on my work PC without Admin rights? Anki web is not useful as I need to create decks(with images) from my work PC.
Looking forward to your feedback!

1 Like

Anki doesn’t normally require admin access to be installed and run.
But if it was blocked by a group policy or something similar, you have to reach out to your company to ask them to whitelist it.

1 Like

You may want to try this:
https://docs.ankiweb.net/files.html?#running-from-a-flash-drive

1 Like

A completely alternative solution would be to create a live system. This is probably a bit harder to achieve than running Anki from a flash drive, as proposed by @cqg, impossible if your work PC does not allow you to boot from a usb stick (some companies deny this, some don’t…), but otherwise it’s much more flexible because you would suffer no limitations on what you could install on your system (if you make it persistent, which I recommend), and you would even be able to run Anki on any computer you come across, no matter the restrictions on this computer (except being able to boot on a usb stick).
If you want to do this, be aware that although it’s a bit tricky, there are tons of tutorial for any kind of particular setup you might want to have, so at first it’s going to require some time but you’re not going to be lost.

1 Like

Anki installs and starts just fine without admin rights. The only issue is that the installer is packaged in a way that demands them. This can be bypassed. This works for me:

  1. Download the Anki installer. We’ll assume it’s called anki-2.1.49-windows.exe and that it’s downloaded to your Downloads folder (the one with the blue downward arrow icon in Explorer).
  2. Push Start and search for “Command Prompt”. Run it. A black command window appears.
  3. Take note of the path to the left of the >. It’s C:\Users\user for me. Select it with the mouse (excluding the >) and push Return to copy it to the clipboard.
  4. Enter the following commands, pushing Return after each line:
   set __COMPAT_LAYER=RUNASINVOKER
   cd Downloads
   anki-2.1.49-windows.exe
  1. The Anki installer should open. The default install path is C:\Program Files\Anki, but we can’t write there.
  2. Replace the path by pasting from the clipboard and append a subdirectory you like. Don’t use any “special characters” for this (see note below). I’ll use \Anki. My home path is C:\Users\user, so my install path box now says C:\Users\user\Anki.
  3. Copy the whole path to the clipboard
  4. Click “Install” to complete the installation
  5. This way of installing doesn’t seem to create start menu icons. Open an Explorer window, paste the Anki installation path into the address bar and press Return
  6. There should be an anki.exe in the folder you’re looking at. Run it, or create a shortcut, or whatever. :wink:

Note: It seems Anki refuses to start if the install path has special characters. I.e. it installed but then didn’t start properly from C:\Users\俺様\Anki (on a Japanese Windows).

2 Likes

Wow… thank you all for your responses! Appreciate your support. I will try out the solutions mentioned and check if these work

If you just want to review cards or create very basic cards you could also just use AnkiWeb.

Neat trick!

Does this still occur with 2.1.50beta2?

Yes, but the behavior is different.

2.1.49

On a fresh install (i.e. without prefs21.db), the initial language selection screen comes up, and after choosing a language and clicking “Yes”, Anki manages to start mpv.exe, but then dies silently.

Console output:

[11468] PyInstaller Bootloader 3.x
[11468] LOADER: executable is C:\Users\俺様\Anki\anki-console.exe
[11468] LOADER: homepath is C:\Users\俺様\Anki
[11468] LOADER: _MEIPASS2 is NULL
[11468] LOADER: archivename is C:\Users\俺様\Anki\anki-console.exe
[11468] LOADER: C:\Users\俺様\Anki\anki-console.exe contains a digital signature
[11468] LOADER: No need to extract files to run; setting extractionpath to homepath
[11468] LOADER: SetDllDirectory(C:\Users\俺様\Anki)
[11468] LOADER: Already in the child - running user's code.
[11468] LOADER: Python library: C:\Users\俺様\Anki\python38.dll
[11468] LOADER: Loaded functions from Python library.
[11468] LOADER: Manipulating environment (sys.path, sys.prefix)
[11468] LOADER: sys.prefix is C:\Users\俺様\Anki
[11468] LOADER: Pre-init sys.path is C:\Users\俺様\Anki\base_library.zip;C:\Users\俺様\Anki
[11468] LOADER: Setting runtime options
[11468] LOADER: Initializing python
[11468] LOADER: Overriding Python's sys.path
[11468] LOADER: Post-init sys.path is C:\Users\俺様\Anki\base_library.zip;C:\Users\俺様\Anki
[11468] LOADER: Setting sys.argv
[11468] LOADER: setting sys._MEIPASS
[11468] LOADER: importing modules from CArchive
[11468] LOADER: extracted struct
[11468] LOADER: callfunction returned...
[11468] LOADER: extracted pyimod01_os_path
[11468] LOADER: callfunction returned...
[11468] LOADER: extracted pyimod02_archive
[11468] LOADER: callfunction returned...
[11468] LOADER: extracted pyimod03_importers
[11468] LOADER: callfunction returned...
[11468] LOADER: Installing PYZ archive with Python modules.
[11468] LOADER: PYZ archive: PYZ-00.pyz
[11468] LOADER: Running pyiboot01_bootstrap.py
[11468] LOADER: Running pyi_rth_win32comgenpy.py
[11468] LOADER: Running pyi_rth_multiprocessing.py
[11468] LOADER: Running pyi_rth_certifi.py
[11468] LOADER: Running pyi_rth_pyqt5.py
[11468] LOADER: Running pyi_rth_pkgres.py
[11468] LOADER: Running pyi_rth_pyqt5webengine.py
[11468] LOADER: Running runanki.py
Qt warning: Qt WebEngine resources not found at C:/Users/?�L?l/Anki/PyQt5/Qt/resources. Trying parent directory...
Qt warning: Qt WebEngine resources not found at C:/Users/?�L?l/Anki/PyQt5/Qt. Trying application directory...
Qt warning: Qt WebEngine resources not found at C:/Users/���l/Anki. Trying fallback directory... The application MAY NOT work.
Qt warning: Installed Qt WebEngine locales directory not found at location C:/Users/?�L?l/Anki/PyQt5/Qt/translations\qtwebengine_locales. Trying application directory...
Qt warning: Qt WebEngine locales directory not found at location C:/Users/���l/Anki\qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
[0127/085225.609:ERROR:icu_util.cc(170)] Invalid file descriptor to ICU data received.

The last line is the only one that ends up in debug.log in the Anki directory, also on subsequent start attempts.

2.1.50beta2

This version fails immediately with a message box (both Qt5 and Qt6):

無題

Console output:

Initial setup...
Preparing to run...
Qt warning: Could not find the Qt platform plugin "windows" in ""
Qt fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

This seems to be a file system encoding issue. I also tried running all tested versions with set PYTHONUTF8=1, but it didn’t make a difference.

Thanks for testing. I had thought it might be an issue with the packager Anki 2.1.49 uses, but the fact that it doesn’t work in 2.1.50 seems to point to it being a bug in Qt or PyQt.