anki-sync-server icon indicating copy to clipboard operation
anki-sync-server copied to clipboard

Failed install using pip

Open zserg opened this issue 9 years ago • 6 comments
trafficstars

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.

zserg avatar May 20 '16 09:05 zserg

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

dsnopek avatar May 23 '16 12:05 dsnopek

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

gruentee avatar Sep 10 '16 12:09 gruentee

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.

dog-2 avatar Jan 10 '17 03:01 dog-2

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

gajewsk2 avatar Aug 20 '17 04:08 gajewsk2

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.

hmgqzx avatar Jul 31 '18 11:07 hmgqzx

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

maquedexiju avatar Mar 06 '20 07:03 maquedexiju