Error when trying to install markovify

Asked 1 years ago, Updated 1 years ago, 280 views

pipe install markovify
When I run , I get the following error and I can't move on, how can I fix it?

ERROR: Command errored out with exit status1:
     command: 'C:\Users\taiki\AppData\Local\Programs\Python\Python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\taiki\\AppData\\Local\\Temp\\pip-install-lep8bohx\\markovify\\setup.py'"'"'; __file__='"'"'C:\\Users\\taiki\\AppData\\Local\\Temp\\pip-install-lep8bohx\\markovify\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace(''''\r\n''''',''''\n'''');f.close();exec(compile(code,__file__,''''exec''''''')')'egg_info --egg-base'C:\Users\taiki\Dat\pepalpipo-pipo-pempipo-pipo
         cwd: C:\Users\taiki\AppData\Local\Temp\pip-install-lep8bohx\markovify\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\taiki\AppData\Local\Temp\pip-install-lep8bohx\markovify\setup.py", line 12, in <module>
        long_description=f.read()
    UnicodeDecodeError: 'cp932' codec can't decode byte 0x94 in position 8016: illegal multibyte sequence
    ----------------------------------------
ERROR: Command error out with exit status 1: python setup.py eg_info Check the logs for full command output.

python windows pip

2022-09-30 21:51

2 Answers

Try executing the command setPYTHONUTF8=1 before executing the pip command.

When Python opens a text file, it uses a locale if the default character code is Unix (such as macOS or Linux), or a code page that GetACP() returns if Windows (cp932, or Shift-JIS in Japanese).

However, Unix's world locale is now mostly UTF-8, so programmers using Unix often expect to open UTF-8 files without specifying a character code when opening them.

set PYTHONUTF8=1 enables Python UTF-8 mode to use UTF-8 regardless of locale or code page.You can now run programs that expect UTF-8 on Windows.


2022-09-30 21:51

I stumbled with the same error.

Unicode related errors appear
Control Panel → Clock and Region → Region → Management → System Locale Changes → Use utf-8
pip install markovify worked after the .


2022-09-30 21:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.