Search code examples
pythonpython-3.9python-unicodeclass-eval

How to install classeval in python? UnicodeDecode Error in classeval installation


I receive an UnicodeDecode error when I try to install classeval (idk if important, but actually i received this error while trying to install hgboost).

Here it is:

pip install classeval

output:

    PS C:\Users\username> pip install classeval
    Collecting classeval
      Using cached classeval-0.2.0-py3-none-any.whl (16 kB)
    Requirement already satisfied: matplotlib in c:\users\pool user\appdata\local\programs\python\python39\lib\site-packages (from classeval) (3.7.1)
    Requirement already satisfied: numpy in c:\users\pool user\appdata\local\programs\python\python39\lib\site-packages (from classeval) (1.24.3)
    Collecting funcsigs (from classeval)
      Using cached funcsigs-1.0.2-py2.py3-none-any.whl (17 kB)
    Collecting sklearn (from classeval)
      Using cached sklearn-0.0.post4.tar.gz (3.6 kB)
      Preparing metadata (setup.py) ... error
      error: subprocess-exited-with-error
    
     
    
      × python setup.py egg_info did not run successfully.
      │ exit code: 1
      ╰─> [8 lines of output]
          Traceback (most recent call last):
            File "<string>", line 2, in <module>
            File "<pip-setuptools-caller>", line 34, in <module>
            File "C:\Users\username\AppData\Local\Temp\pip-install-un1et16c\sklearn_21d090e9d79841c3b3896f51b6610d17\setup.py", line 10, in <module>
              LONG_DESCRIPTION = f.read()
            File "c:\users\username\appdata\local\programs\python\python39\lib\encodings\cp1252.py", line 23, in decode
              return codecs.charmap_decode(input,self.errors,decoding_table)[0]
          UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 7: character maps to <undefined>
          [end of output]
    
     
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed
    
     
    
    × Encountered error while generating package metadata.
    ╰─> See above for output.

 

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Any idea how to solve this problem?


Solution

  • Thanks for your answers.

    In my case, this error was related to the region settings. Here is the answer that solved my problem: region setting for Unicode