Pysyft: Error when installing via `pip install syft`

Created on 9 Dec 2020  路  8Comments  路  Source: OpenMined/PySyft

Description

When installing using pip install syft, I'm getting the error:

$ pip install syft
Collecting syft
  Using cached syft-0.3.0-py2.py3-none-any.whl (289 kB)
  Using cached syft-0.2.9-py3-none-any.whl (433 kB)
  Using cached syft-0.2.8-py3-none-any.whl (415 kB)
  Using cached syft-0.2.7-py3-none-any.whl (394 kB)
  Using cached syft-0.2.6-py3-none-any.whl (377 kB)
  Using cached syft-0.2.5-py3-none-any.whl (369 kB)
  Using cached syft-0.2.4-py3-none-any.whl (341 kB)
  Using cached syft-0.2.3-py3-none-any.whl (331 kB)
ERROR: Cannot install syft==0.2.3, syft==0.2.4, syft==0.2.5, syft==0.2.6, syft==0.2.7, syft==0.2.8, syft==0.2.9 and syft==0.3.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    syft 0.3.0 depends on torch>=1.5
    syft 0.2.9 depends on torch~=1.4.0
    syft 0.2.8 depends on torch~=1.4.0
    syft 0.2.7 depends on torch~=1.4.0
    syft 0.2.6 depends on torchvision~=0.5.0
    syft 0.2.5 depends on torchvision~=0.5.0
    syft 0.2.4 depends on torchvision~=0.5.0
    syft 0.2.3 depends on torchvision~=0.5.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

How to Reproduce

Type pip install syft

System Information

  • OS: MacOS
  • OS Version: 11.0.1
  • Language Version: Python 3.9.0
  • Package Manager Version: Conda 4.9.2
Type

All 8 comments

Facing the exact same issue on Windows 10.

@Wilann As a temporary resolution, you can try these steps.
1) pip install syft==0.3.0
2) If 1 fails, install pytorch
3) Try 1 again

@jaintj95 Worked perfectly - thanks a lot!

Unfortunately, PyTorch does not support Python 3.9 yet so we are unable to support it either.
I would suggest using a tool like pyenv so you can install multiple versions of Python 3 on MacOS now that brew is upgrading the current python 3 to 3.9.0.

@madhavajay I had the same issue with Python 3.8.x

Hi @jaintj95, Do you have an existing installation of torch? Are you able to show some steps to re-produce your 3.8.x error?

The issue arises due to conflicting dependencies of different versions for syft.
As, @madhavajay suggested, you should consider using virtualenvs if you seek to work with multiple versions. Or consider uninstalling previous versions, if you currently don't have dependendents off them.
On a side note, we recent brought major changes in recent releases for pysyft(v0.3.x), and it is recommended to switch to current versions to recieve all the cool new changes. 馃殌

Torch 1.4.0 is installed in Conda base package but I created a separated conda environment for syft.

Steps:

$ conda create -n pysyft python=3.8
$ conda activate pysyft
$ conda install jupyter notebook
$ pip install syft

@jaintj95 We can add some Conda tests to our CI to see whats happening and make sure this isnt an issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

IonesioJunior picture IonesioJunior  路  3Comments

iamtrask picture iamtrask  路  3Comments

jvmncs picture jvmncs  路  3Comments

swaroopch picture swaroopch  路  4Comments

samsontmr picture samsontmr  路  3Comments