ViperMonkey icon indicating copy to clipboard operation
ViperMonkey copied to clipboard

unidecode

Open xorhex opened this issue 6 years ago • 5 comments

Awesome project!

A fresh install needed the python library unidecode installed as well. Guessing it should be added to requirements.txt?

xorhex avatar Aug 21 '18 19:08 xorhex

I'll add it, although it should not be necessary when using pip, because it's listed in setup.py.

decalage2 avatar Aug 21 '18 19:08 decalage2

Receiving following error after installing pypy et al: Traceback (most recent call last): File "vmonkey.py", line 123, in <module> from core import * File "/home/fetchered/viper/vipermonkey/core/__init__.py", line 93, in <module> import unidecode ImportError: No module named unidecode

Re-installed unidecode with: sudo pip install --upgrade --force-reinstall unidecode

Still received the same error. Thoughts? Python2.7.14, pypy v2.7.13, SIFT v3 (Ubuntu 16.04.5) VM w/latest SIFT CLI. Get a different error with python2.7, will create a new issue for that.

Fetchered avatar Aug 21 '18 23:08 Fetchered

The issue may be due to pip and which python distribution it corresponds to. E.g. you may have python 2, 3 and pypy installed, but when you run the pip command maybe it installs packages on python 2 or 3 only. I've seen both cases depending how your system is installed.

A cleaner way to run pip avoiding the confusion between several python versions, is to use "sudo python -m pip" (or python3 or pypy) instead of "sudo pip" alone. Then you control which python interpreter runs pip.

So in your case with pypy that would be something like:

sudo pypy -m pip install -U unidecode

decalage2 avatar Aug 22 '18 09:08 decalage2

Get the following: /usr/local/bin/pypy: No module named pip When using pypy. Pypy is installed and does work, as is pip for both python2.7 and python3 Pip is defaulted to python2.7 pip -V pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7) $ pypy -V Python 2.7.13 (ab0b9caf307d, Apr 24 2018, 18:04:42) [PyPy 6.0.0 with GCC 6.2.0 20160901] Planning on removing python3, reinstalling python2.7 and trying again. Will let you know how it goes.

Fetchered avatar Aug 23 '18 00:08 Fetchered

@Fetchered you might look into using virtualenv to minimize such headaches. It's fairly simple to set one up, and with a bit of tooling* you'll never again have to wonder which instance of python you just installed a package to.

Alternatively, if you're using a debian-based distribution of Linux, you can usually target major version 3 by using modified commands python3 and pip3, though this may turn out to be a bad habit if you find yourself on a non-debian system one day.

*pyenv and direnv together are my favorite tools for this, or you might like autoenv or a solution with more training wheels like anaconda

cwh1te avatar Nov 26 '18 20:11 cwh1te