attapol / tltk

Thai Language Toolkit
GNU Lesser General Public License v3.0
24 stars 5 forks source link

missing matplotlib dependency in setup.py #1

Open EricG-Personal opened 4 years ago

EricG-Personal commented 4 years ago

If I pip install tltk and immediately try to import it, it will fail, complaining that matplotlib is not installed. After installing matplotlib, it will work. matplotlib should be added as a dependency in setup.py.


python3 -m venv tltk
cd tltk
. bin/activate
pip install tltk
python
import tltk

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/private/tmp/tltk/lib/python3.7/site-packages/tltk/__init__.py", line 2, in <module>
    from tltk import corpus
  File "/private/tmp/tltk/lib/python3.7/site-packages/tltk/corpus.py", line 21, in <module>
    import matplotlib
ModuleNotFoundError: No module named 'matplotlib'

exit()
pip install matplotlib
python
import tltk

success

SaraTutorsindia commented 4 years ago

Step1: Download a tltk package from official website pypi.org ” https://pypi.org/project/tltk/#files

Step2: After downloading extract the .rar file “tltk-1.3.1.tar.gz”

Step3: Open setup.py inside folder the “tltk-1.3.1” t in spyder console (or) any other python console

Step4: scroll down and change the following things in screenshot

image

Step5: Save it and open anaconda prompt use “cd” to go to the directory of setup.py similar like in screenshot

First set drive where you unrar the package in C, D or any drive by using command “: d” or any other drive name instead of alphabet “d” press “enter”

image

Use cd through working directory where setup.py file exists press “enter” image

Finally enter “python setup.py install --user” to get install tltk package with matplotlib added in setup.py

image

image

This will work 100% give a try.