Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install Impossible, Probleem with the package #5

Open
flosrv opened this issue Jun 21, 2024 · 1 comment
Open

pip install Impossible, Probleem with the package #5

flosrv opened this issue Jun 21, 2024 · 1 comment

Comments

@flosrv
Copy link

flosrv commented Jun 21, 2024

C:\Users\flosr\Engineering\Data Engineering>pip install amseg
Collecting amseg
Downloading amseg-2.3.tar.gz (11 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\flosr\AppData\Local\Temp\pip-install-_4vble62\amseg_2274f9ad75f64023889cc7957e9016b5\setup.py", line 11, in
long_description=readme(),
^^^^^^^^
File "C:\Users\flosr\AppData\Local\Temp\pip-install-_4vble62\amseg_2274f9ad75f64023889cc7957e9016b5\setup.py", line 4, in readme
return f.read()
^^^^^^^^
File "C:\Users\flosr\AppData\Local\Programs\Python\Python312\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 0x8d in position 778: character maps to
[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.

@Khayo-7
Copy link
Contributor

Khayo-7 commented Jan 24, 2025

Source of error: Unable to decode the content of the README.rst file as it is not read as UTF-8 encoded text in the readme() function.

        ```
        with open('README.rst') as f:
        ```
        should be 
        ```
        with open('README.rst', encoding='utf-8') as f:
        ```

Temporary Solution:

  1. Remove the content of the README.rst file
    or
  2. Comment out the call to the readme() function in the setup function call in the setup.py file as
    setup( ... # long_description=readme(), ... )

Fast Solution/Quick fix: Removing the content of README.rst

  1. Clone the git repo for amseg library

    git clone https://github.com/uhh-lt/amharicprocessor.git
    
    cd amharicprocessor
    
  2. Remove the content of the README.rst file, which was raising the above error

    echo. > README.rst
    
  3. Install the package

    python setup.py install
    
  4. Clean the downloaded files

    cd ..
    
    rmdir /s /q amharicprocessor
    
  5. Verify installation with

    pip install amseg
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants