yuxiangw / autodp

autodp: A flexible and easy-to-use package for differential privacy
Apache License 2.0
269 stars 53 forks source link

An issue when I installed "autodp": Preparing metadata (setup.py) ... error #48

Open kangzhai opened 1 year ago

kangzhai commented 1 year ago

The following issue occurred when I installed “autodp” by "pip install autodp" and I'm not sure how to solve it.

Collecting autodp Using cached autodp-0.2.3.1.tar.gz (56 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\Administrator\AppData\Local\Temp\pip-install-c9_gcmpt\autodp_184d6ab919d64a7f98792f3b252bbe16\setup.py", line 9, in long_description = f.read() UnicodeDecodeError: 'gbk' codec can't decode byte 0x9a in position 3594: illegal multibyte sequence [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.

yuxiangw commented 1 year ago

hmmm... this seems to be a windows problem. I haven't tested it on windows. We will look into it. For now, could you try a local installation using the master branch to see if the issue remains?

phycholosogy commented 8 months ago

Thanks for the response! @yuxiangw I encountered the same issue when installing on Windows. This seems to be because when reading a file in setup.py, the encoding format was not specified as utf-8. I modified the 8th line in setup.py in autodp-0.2.3.1.tar.gz as following and I successfully installed locally: with open("README.md", 'r', encoding='utf-8') as f: If convenient, could you please make the same modifications in the new version to facilitate installation on Windows? Thank you very much, best wishes!