Vocab-Apps / python-pinyin-jyutping-sentence

Convert a Chinese sentence to Pinyin or Jyutping
GNU General Public License v3.0
57 stars 6 forks source link

pip install fails on Python 2.7 (default "python" shipped with MacOS Catalina) #2

Closed jsyang closed 4 years ago

jsyang commented 4 years ago
pip install pinyin_jyutping_sentence
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting pinyin_jyutping_sentence
  Downloading https://files.pythonhosted.org/packages/69/55/fd99c07019fb47277f26cd6a566f9cd7b7b195ea4f9c7e6bfa22666ff8f5/pinyin_jyutping_sentence-0.5.tar.gz (5.8MB)
     |████████████████████████████████| 5.8MB 267kB/s
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/zx/jkf9xxr91ln9_yc8y4ydbj1w0000gn/T/pip-install-jCV6yJ/pinyin-jyutping-sentence/setup.py", line 10, in <module>
        long_description=open('README.rst', encoding='utf-8').read(),
    TypeError: 'encoding' is an invalid keyword argument for this function
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zx/jkf9xxr91ln9_yc8y4ydbj1w0000gn/T/pip-install-jCV6yJ/pinyin-jyutping-sentence/

However, I was able to install it with python3 / pip3:

pip3 install pinyin_jyutping_sentence
Collecting pinyin_jyutping_sentence
  Using cached https://files.pythonhosted.org/packages/69/55/fd99c07019fb47277f26cd6a566f9cd7b7b195ea4f9c7e6bfa22666ff8f5/pinyin_jyutping_sentence-0.5.tar.gz
Collecting jieba (from pinyin_jyutping_sentence)
  Downloading https://files.pythonhosted.org/packages/71/46/c6f9179f73b818d5827202ad1c4a94e371a29473b7f043b736b4dab6b8cd/jieba-0.39.zip (7.3MB)
     |████████████████████████████████| 7.3MB 235kB/s
Building wheels for collected packages: pinyin-jyutping-sentence, jieba
  Building wheel for pinyin-jyutping-sentence (setup.py) ... done
  Stored in directory: /Users/jsyang/Library/Caches/pip/wheels/21/58/2a/c599ff038b13c6afc9c3da33b08dd0a4ceebef54dc83aa33b7
  Building wheel for jieba (setup.py) ... done
  Stored in directory: /Users/jsyang/Library/Caches/pip/wheels/c9/c7/63/a9ec0322ccc7c365fd51e475942a82395807186e94f0522243
Successfully built pinyin-jyutping-sentence jieba
Installing collected packages: jieba, pinyin-jyutping-sentence
Successfully installed jieba-0.39 pinyin-jyutping-sentence-0.5

The readme should probably mention that the user should upgrade to using pip3 / python3 explicitly (python 2.x unsupported after early 2020)

luc-vocab commented 4 years ago

oh yes python2 is unsupported, it's very ancient, thanks for reporting this.