dsnopek / anki-sync-server

A personal Anki sync server (so you can sync against your own server rather than AnkiWeb)
GNU Affero General Public License v3.0
747 stars 95 forks source link

Failed install using pip #40

Open zserg opened 8 years ago

zserg commented 8 years ago

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.

dsnopek commented 8 years ago

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).

gruentee commented 8 years ago

I have the same error here. Using Python 2.7.3 on Debian Wheezie.

dog-2 commented 7 years ago

I also had the same error.

Environment:

Fail: installed by pip, error just like dsnopek said. Succeed: installed by easy_install.

gajewsk2 commented 7 years ago

Seeing this now too. Ubuntu on windows with python 2.7.6, pip 9.0.1

hmgqzx commented 6 years ago

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.

maquedexiju commented 4 years ago

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