johnwmillr / LyricsGenius

Download song lyrics and metadata from Genius.com 🎶🎤
http://www.johnwmillr.com/scraping-genius-lyrics/
MIT License
899 stars 159 forks source link

Package won't install #74

Closed bradydowling closed 5 years ago

bradydowling commented 5 years ago

Describe the bug When I try to install globally using pip install lyricsgenius, I get the following output:

Collecting lyricsgenius
  Using cached https://files.pythonhosted.org/packages/9d/4e/8cd3ff464d5c08e745bfae7c8ea96e64a3584e248ed8b57b9c2d102150d1/lyricsgenius-1.0.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-kJMjH9/lyricsgenius/setup.py", line 21, in <module>
        with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    TypeError: 'encoding' is an invalid keyword argument for this function

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-kJMjH9/lyricsgenius/

Expected behavior A global pip install would work without errors.

To Reproduce Describe the steps required to reproduce the behavior.

  1. Open terminal
  2. pip install lyricsgenius

Include the error message associated with the bug.

TypeError: 'encoding' is an invalid keyword argument for this function

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-kJMjH9/lyricsgenius/

Version info

Additional context I'm coming from a Node background so this could easily be something I'm doing but I tried this with pipenv, virtualenv, global pip install, and on an AWS Cloud9 instance (to make sure my global pip isn't muddied) and I got similar results each time so I'm thinking there could be an issue at play.

johnwmillr commented 5 years ago

Ah! Definitely an issue. I’ll look into this within the next few days. Thanks for the thorough bug report!

johnwmillr commented 5 years ago

What version of pip and Python are you using?

bradydowling commented 5 years ago

I've also tried to install using Python3/pip3 but again, I don't speak Python well so keep that in mind as a potential cause here. I'm continuing to look into this though and I'll report if I find out something I'm doing wrong.

~  pip --version
pip 18.0 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
johnwmillr commented 5 years ago

I think your issue may be coming from attempting to install the package using Python 2.7 and its corresponding version of pip.

I will update the setup.py file to explicitly raise an error when called via Python 2.x

If you have pip3 installed, try pip3 install lyricsgenius. Let me know how it works out for you.

bradydowling commented 5 years ago

Ya it looks like it installs just fine globally using pip3 and then I can call it from the CLI so this is likely an issue I had with Python 2.x in whatever environment I was trying with each time.

johnwmillr commented 5 years ago

Great! I'll close this issue with a PR adding the Python 2.x warning to setup.py.