PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

Can't install syft 0.8.1

Open makinno opened this issue 2 years ago • 5 comments

Description

pip install syft failed like below

C:\Users\DELL>pip install syft Collecting syft Using cached syft-0.8.1-py2.py3-none-any.whl (338 kB) Collecting bcrypt==4.0.1 (from syft) Using cached bcrypt-4.0.1-cp36-abi3-win_amd64.whl (152 kB) Collecting forbiddenfruit==0.1.4 (from syft) Using cached forbiddenfruit-0.1.4.tar.gz (43 kB) Preparing metadata (setup.py) ... done Collecting gevent==22.10.2 (from syft) Using cached gevent-22.10.2-cp310-cp310-win_amd64.whl (1.5 MB) Collecting gipc==1.5.0 (from syft) Using cached gipc-1.5.0.tar.gz (66 kB) Preparing metadata (setup.py) ... done Collecting jax==0.4.10 (from syft) Using cached jax-0.4.10.tar.gz (1.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done INFO: pip is looking at multiple versions of syft to determine which version is compatible with other requirements. This could take a while. Collecting syft Using cached syft-0.8.0.post2-py2.py3-none-any.whl (200 kB) Collecting astunparse==1.6.3 (from syft) Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB) Collecting flax==0.5.3 (from syft) Using cached flax-0.5.3-py3-none-any.whl (202 kB) Collecting jax==0.3.14 (from syft) Using cached jax-0.3.14.tar.gz (990 kB) Preparing metadata (setup.py) ... done Collecting syft Using cached syft-0.7.0-py2.py3-none-any.whl (7.8 MB) Collecting ascii-magic==1.6 (from syft) Using cached ascii_magic-1.6-py3-none-any.whl (7.6 kB) Collecting boto3==1.26.51 (from syft) Using cached boto3-1.26.51-py3-none-any.whl (132 kB) Collecting cachetools>=3.1 (from syft) Using cached cachetools-5.3.1-py3-none-any.whl (9.3 kB) Collecting syft Using cached syft-0.6.0-py2.py3-none-any.whl (606 kB) Collecting werkzeug==2.0.2 (from syft) Using cached Werkzeug-2.0.2-py3-none-any.whl (288 kB) Collecting autodp==0.2 (from syft) Using cached autodp-0.2.tar.gz (39 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\DELL\AppData\Local\Temp\pip-install-5m3sd04x\autodp_71f80bcdd8f7435ebbc8ee5d7209433b\setup.py", line 6, 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.

System Information

  • OS: Windows 10 Pro
  • OS Version: 22H2
  • Language Version: Python 3.10

makinno avatar Jun 27 '23 10:06 makinno

Hi @makinno I am trying to figure out how we can debug this. I believe its related to your operating system's language / locale settings and its ability to decode the README.md file. We test this in Windows on GitHub CI but my guess is that the language and locale are EN / US.

It would help if we knew what characters are being misinterpreted in the readme.

This looks like the same problem here: https://github.com/alibaba/web-editor/issues/105

I think the solution is to force Python to load in UTF8 mode.

https://stackoverflow.com/questions/50933194/how-do-i-set-the-pythonutf8-environment-variable-to-enable-utf-8-encoding-by-def

You might be able to do something like:

set PYTHONUTF8=1 
pip install -U syft

or

python3  -X utf8 -m pip install -U syft 

madhavajay avatar Jun 28 '23 22:06 madhavajay

Hi @madhavajay, thank you for your fast response!

You may be right that the decoding error is due to the Chinese (zh-CN) language setting on my computer's operating system. However, I have identified that the problem specifically originates from the "autodp" package (https://github.com/yuxiangw/autodp.git), as mentioned in this issue: https://github.com/yuxiangw/autodp/issues/37#issue-1380117212.

Initially, I believed that by installing the "autodp" package separately using the solution suggested in the aforementioned link (pip install -e), the "syft" package installation (pip install -U syft) would recognize that the requirement for "autodp" is already satisfied. However, even though the installation of "autodp==0.2" was successful, I encountered the same error when attempting to install "syft."

Is there a way to remove "autodp==0.2" as a dependency of "syft" since it is already installed on my computer?

Additionally, I tried the solution you suggested for forcing Python to load in UTF8 mode by running: python -X utf8 -m pip install -U syft Unfortunately, I encountered the same error mentioned earlier.

Please let me know if there are any other possible solutions or suggestions. Thank you!

makinno avatar Jun 29 '23 01:06 makinno

I met the same problem with you.Can you tell me whether you have solutions and what it si . Thank you.

MyStarNight avatar Oct 12 '23 06:10 MyStarNight

Hello @MyStarNight , I did manage to install PySyft successfully, although it's been a while, so I might not remember all the details. However, I stopped using it later on due to a lack of sufficient documentation to replicate existing tutorials. If you're looking to install PySyft, I can suggest the following steps:

  1. Install PySyft using the following command: pip install syft -U -f https://whls.blob.core.windows.net/unstable/index.html
  2. Make sure you have the latest PyTorch installed. If you haven't already installed it, you can do so by running: pip install torch

I hope this helps you get started with PySyft. Good luck!

makinno avatar Oct 13 '23 01:10 makinno

@MyStarNight are you still having this issue it was probably related to Windows and UTF8 language. The above commands can help force windows to use UTF8. I would guess this has probably been fixed in Windows and Python in recent versions but we don't use Windows in asian languages to test it.

If its still a problem let me know.

madhavajay avatar Feb 15 '24 03:02 madhavajay

Closing for now.

madhavajay avatar Feb 26 '24 13:02 madhavajay