anki-sync-server
anki-sync-server copied to clipboard
Failed install using pip
I have Debain system and installed AnkiServer using pip in virtualenv:
pip install AnkiServer
cp ./examples/example.ini production.ini
./bin/ankiserverctl.py debug
The following error appears:
import anki
ImportError: No module named anki
If I download package from PyPi and install manually (python setup.py install) everything works fine.
Hrm. I'm able to reproduce this!
It appears that the 'anki-bundled' directory is getting put in a different location than it used to. We're expecting it to be put inside the 'AnkiServer' directory itself, but it's being put at the top of the virtualenv root (when using a virtualenv).
Probably something changed in pip, because we definitely didn't change the way we package anything (so little has changed over the last couple years).
I have the same error here. Using Python 2.7.3 on Debian Wheezie.
I also had the same error.
Environment:
- Python 2.7.12 on Mac OS X.
- running in virtualenv
Fail: installed by pip, error just like dsnopek said. Succeed: installed by easy_install.
Seeing this now too. Ubuntu on windows with python 2.7.6, pip 9.0.1
I have the same problem here. Debian with Python 2.7 and pip 9.0.1, without virtualenv.
When installed by pip, its directories are put Incorrectly:
/usr/local/anki-bundled/...
/usr/local/lib/python2.7/dist-packages/AnkiServer-2.0.6.dist-info/...
/usr/local/examples/...
easy_install AnkiServer works.
You can copy /usr/local/anki-bundled/anki to /usr/local/lib/python2.7/dist-packages/
The /usr/local/ might be ~/.local for you, and replace the corrent python version