Janujan / Lyricize

Django app that uses the Genius API to analyze artist lyrics
0 stars 0 forks source link

Add Wordcloud Function #18

Open SunnyShikhar opened 5 years ago

SunnyShikhar commented 5 years ago

Breaking changes:

Outputting a generic wordcloud but can get very creative with images/png for example: http://ramiro.org/notebook/sherlock-holmes-canon-wordcloud/

Including stopwords:

Janujan commented 5 years ago

Also, running into this issue. I dont think i've ran matplot lib on my computer before so it might just be a set up issue.

File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/lyricize/summary.py", line 4, in <module> import matplotlib.pyplot as plt File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2372, in <module> switch_backend(rcParams["backend"]) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/pyplot.py", line 207, in switch_backend backend_mod = importlib.import_module(backend_name) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/backends/backend_macosx.py", line 14, in <module> from matplotlib.backends import _macosx ImportError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

Any advice?

SunnyShikhar commented 5 years ago

Also, running into this issue. I dont think i've ran matplot lib on my computer before so it might just be a set up issue.

File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/lyricize/summary.py", line 4, in <module> import matplotlib.pyplot as plt File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2372, in <module> switch_backend(rcParams["backend"]) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/pyplot.py", line 207, in switch_backend backend_mod = importlib.import_module(backend_name) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/backends/backend_macosx.py", line 14, in <module> from matplotlib.backends import _macosx ImportError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

Any advice?

Yeah ran into this as well, had to follow these two steps listed in the solution here: https://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python

Lotta catches with this PR ... let's see if we can avoid merging this. I just think matplotlib got some issues and is not ideal for us to be using for frontend. This is just to circumvent having to do viz in front end, but if I can expand my top10words to top20 or something, we can look into using JavaScript or D3.js?

SunnyShikhar commented 5 years ago

Also, are you using a virtual env and then pip install -r requirements.txt? I'm doing this atm but I don't if removal of modules from requirements.txt is also reflected in pip freeze after running that.

*Also for that error message, go three tildas next time for me plz:


File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/lyricize/summary.py", line 4, in <module> import matplotlib.pyplot as plt File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/pyplot.py", line 2372, in <module> switch_backend(rcParams["backend"]) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/pyplot.py", line 207, in switch_backend backend_mod = importlib.import_module(backend_name) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/janujanselva/Documents/dev/python_dev/webapp/lyricize/local_env/lib/python3.7/site-packages/matplotlib/backends/backend_macosx.py", line 14, in <module> from matplotlib.backends import _macosx ImportError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.``` 
Janujan commented 5 years ago

Yeah I'm in a virtual env and am running pip install -r requirements.txt when switching to each branch.

And okay sounds good.