cp949编解码器无法在位置2095解和字节0xe2:非法多字节序列,命令“python setup.py egg_info”失败,错误代码1

2024-10-01 22:25:30 发布

您现在位置:Python中文网/ 问答频道 /正文

当我安装计数器包时,有一些问题。快来人帮帮我!!我寻找了许多解决办法,但都不适用于我的问题。我想“临时工”出了点问题,但我不确定。在

C:\Users\x3k-k37\Desktop>pip install counter Collecting counter
Using cached Counter-1.0.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "C:\Users\x3k-k37\AppData\Local\Temp\pip-build-b488v7dx\counter\setup.py", line 32, in long_description=getLongDescription(), File "C:\Users\x3k-k37\AppData\Local\Temp\pip-build-b488v7dx\counter\setup.py", line 13, in getLongDescription for line in file: UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 2095: illegal multibyte sequence

Command "python setup.py egg_info" failed with error code 1 in C:\Users\x3k-k37\AppData\Local\Temp\pip-build-b488v7dx\counter\


Tags: pipinpybuildlocalsetuplinecounter
1条回答
网友
1楼 · 发布于 2024-10-01 22:25:30
  1. downloaded 'Counter package' from github(https://github.com/KelSolaar/Counter). please refer to Installation in README.rst)
  2. open 'Counter'in downloaded folder

  3. edit setup.py below

import re
from setuptools import setup

setup(name="Counter",
version="1.0.0",
author="Thomas Mansencal",
author_email="thomas.mansencal@gmail.com",
include_package_data=True,
py_modules=["counter"],
url="https://github.com/KelSolaar/Counter",
license="MIT",
description="Counter package defines the \"counter.Counter\" class similar to bags or multisets in other languages.",
install_requires=[],
tests_require=["nose"],
classifiers=["Development Status :: 5 - Production/Stable",
            "Environment :: Console",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: MIT License",
            "Natural Language :: English",
            "Operating System :: OS Independent",
            "Programming Language :: Python",
            "Topic :: Utilities"]) 
  1. install 'Counter package'
^{pr2}$

相关问题 更多 >

    热门问题