Open jabobian opened 3 years ago
Hi @jabobian,
Thank you for raising this issue.
So the first thing I want to check is that you are using the latest version of the server i.e. the develop branch? This version of the anki-sync-server will install anki
directly from PyPI.
I would also like to confirm your Python version. The latest version of anki
requires a minimum Python version of 3.8.
Finally, can you provide your operating system? It looks like you're using Anaconda (Miniconda) on Windows. What command are you using to install the requirements?
Once you provide the following information, we can look into this further.
Hi, @VikashKothary My Python version 3.7. I will try to install Python 3.8. OS is Win 10, with Miniconda. The commands used are
Did Python 3.8 work for you?
Hello, I'm not the OP but i have the same issue. Python is 3.10.6. Running Ubuntu 22.04 Jammy inside docker.
Error /srv/anki-syncserver/anki-venv/bin/python: Error while finding module specification for 'anki.syncserver' (ModuleNotFoundError: No module named 'anki')
Well actually i'm using the official https://docs.ankiweb.net/sync-server.html so probably came here by mistake.
Following the procedures, I got:
(ankiweb) D:\Soft\Language\Anki\anki-sync-server\src>python -m ankisyncd Traceback (most recent call last): File "d:\Miniconda3\envs\ankiweb\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "d:\Miniconda3\envs\ankiweb\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\Soft\Language\Anki\anki-sync-server\src\ankisyncd__main__.py", line 8, in
import ankisyncd.sync_app
File "D:\Soft\Language\Anki\anki-sync-server\src\ankisyncd\sync_app.py", line 37, in
import anki.db
ModuleNotFoundError: No module named 'anki'
So I googled and found https://github.com/dsnopek/anki-sync-server/issues/40 There is a anki-bundled link in https://github.com/dsnopek/anki-sync-server Copying the downloaded anki folder to D:\Miniconda3\envs\ankiweb\Lib\site-packages and rerun shows Exception: Anki should be run with Python 2
So I download https://github.com/ankicommunity/anki-core/tree/master/anki and copy to D:\Miniconda3\envs\ankiweb\Lib\site-packages Now the error is as follows: (ankiweb) D:\Soft\Language\Anki\anki-sync-server\src>python -m ankisyncd Traceback (most recent call last): File "d:\Miniconda3\envs\ankiweb\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "d:\Miniconda3\envs\ankiweb\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\Soft\Language\Anki\anki-sync-server\src\ankisyncd__main__.py", line 8, in
import ankisyncd.sync_app
File "D:\Soft\Language\Anki\anki-sync-server\src\ankisyncd\sync_app.py", line 41, in
from ankisyncd.full_sync import get_full_sync_manager
File "D:\Soft\Language\Anki\anki-sync-server\src\ankisyncd\full_sync.py", line 11, in
from anki.collection import Collection
ImportError: cannot import name 'Collection' from 'anki.collection' (d:\Miniconda3\envs\ankiweb\lib\site-packages\anki\collection.py)
Please help, and Thanks!