Lunarsolarconverter install third-party libraries Tip: ERROR: Command errored out with exit status 1: python setup.py egg_info Check th e logs for full command output.

When you install third-party libraries lunarsolarconverter tips:

      File "<string>", line 1, in <module>
      File "C:\Users\Administrator\AppData\Local\Temp\pip-install-wr4z978d\Lunar
SolarConverter\setup.py", line 15, in <module>
        long_description = f.read()
    UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 65: illeg
al multibyte sequence
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.

 According to prompt information should be read in the file related to the Chinese

Download the LunarSolarConverter-1.1.0.tar.gz to unpack the local and view them setup.py file, where lines 14 and 15:

with open('README.rst') as f:
    long_description = f.read()

Issue should be out of the line 14  open  this function should increase thereafter OF  encoding = ' UTF-. 8 '  , to ensure correct data reading.

Since the positioning to the question on the amendment verification under the bar. The revised Code:

with open('README.rst', encoding='UTF-8') as f:
    long_description = f.read()

Because we modify the content of the document, so we had to localize installation code:  Python setup.py install 

operation result:

Installed f:\python38\lib\site-packages\lunarsolarconverter-1.1.0-py3.8.egg
Processing dependencies for LunarSolarConverter==1.1.0
Finished processing dependencies for LunarSolarConverter==1.1.0

Solve the problem, call it a day.

Guess you like

Origin www.cnblogs.com/M-write/p/12319207.html