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

安装失败 #2

Closed
iris-qq opened this issue Apr 19, 2023 · 2 comments
Closed

安装失败 #2

iris-qq opened this issue Apr 19, 2023 · 2 comments

Comments

@iris-qq
Copy link

iris-qq commented Apr 19, 2023

错误信息

➜  ~ pip install pyobject
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting pyobject
  Downloading http://mirrors.aliyun.com/pypi/packages/7d/cb/e5e7430ee6d5252b9968407f661e9277cd32f5dfb12ad8fb9ced880ae3c9/pyobject-1.1.3.tar.gz (18 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 "/private/var/folders/8q/3krsp2616ql3rhhfcnf7rz_80000gn/T/pip-install-sa88iaqr/pyobject_11556feeca374c0d84152635d4327e39/setup.py", line 8, in <module>
          long_desc=open("README.rst").read()
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/codecs.py", line 322, in decode
          (result, consumed) = self._buffer_decode(data, self.errors, final)
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 13: invalid start byte
      [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.

python版本

➜  ~ python -V
Python 3.11.3

操作系统

macOS Ventura 13.3.1
@qfcy
Copy link
Owner

qfcy commented Apr 30, 2023

可以先在 https://pypi.org/project/pyobject/#files 下载tag.gz格式的文件,解压,修改setup.py,将long_desc=open("README.rst").read()改为long_desc=open("README.rst",encoding="gbk").read(),再重新压缩为tar.gz文件,然后再用 pip install <tar.gz文件的路径> 这一命令安装,即可。
抱歉我只有Windows电脑,没有MacOS,而windows下默认用的是gbk编码,所以没有考虑到这一点😂

@qfcy
Copy link
Owner

qfcy commented Aug 12, 2024

现在的1.2.4版本已经修复了这个bug,增加了对其他OS的支持。😀

@iris-qq iris-qq closed this as completed Aug 14, 2024
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