LSYS / LexicalRichness

:smile_cat: :speech_balloon: A module to compute textual lexical richness (aka lexical diversity).
http://lexicalrichness.readthedocs.io/
MIT License
96 stars 19 forks source link

wheel installation issue due to encoding #82

Open ValRCS opened 1 year ago

ValRCS commented 1 year ago

Getting an UnicodeDecodeError when attempting to install LexicalRichness

Windows 10 Pro inside venv on Python 3.11.5 There should not be any non ascii characters in my file paths

(venv) PS C:\Users\vsaules\Github\lnb_tagger> pip install lexicalrichness
Collecting lexicalrichness
  Downloading lexicalrichness-0.5.1.tar.gz (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.8/97.8 kB 511.8 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      Traceback (most recent call last):
        File "C:\Users\vsaules\Github\lnb_tagger\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\vsaules\Github\lnb_tagger\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\vsaules\Github\lnb_tagger\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\vsaules\AppData\Local\Temp\pip-build-env-2l4tmxlh\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "C:\Users\vsaules\AppData\Local\Temp\pip-build-env-2l4tmxlh\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\vsaules\AppData\Local\Temp\pip-build-env-2l4tmxlh\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 9, in <module>
        File "C:\Users\vsaules\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1257.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      UnicodeDecodeError: 'charmap' codec can't decode byte 0xa1 in position 847: character maps to <undefined>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

requirements.txt

KatariinaIngerma commented 9 months ago

Maybe try to edit in Control panel - Clock and Region - Administrative - Change system locale.. and tick Beta: Use Unicode UTF-8 for worldwide language support. This fixed the issue for me.