PySyft
PySyft copied to clipboard
Conflict in installing dependent packages during installation of syft or hagrid
Where?
Where are you looking to add documentation? Which file? Which feature?
Installation FAQs
Who?
Who is your audience for this documentation issue?
Anyone who has a conflict of versions of an existing package during installation of syft or hagrid.
What?
Describe what you would like this documentation to accomplish.
So, during installation of syft or hagrid, if pip's dependency resolver results in a conflict due to package version issue, then upgrade that package to the version specified by the pip.
e.g. During installation of hagrid, if the packaging version is old and results in the following error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
hagrid 0.2.92 requires packaging>=21.3, but you have packaging 21.2 which is incompatible.
then, upgrade the packaging library to the version specified in the error. We can do this by running the command:
pip install -U <package_name>==<version>
e.g. for the above case the command would be pip install -U packaging==21.4
Additional Context
Add any other context about the problem here.
Unfortunately in my commit message for the change its not clear if I upgraded it due to functionality requirements or a security issue. If we can down grade thats one solution but unfortunately if a user trys to install and it fails due to pip dependencies there isnt really any way we can hook in with a message to tell them to do anything else.
If this happens in the quickstart environment it will be a virtualenv so this shouldnt happen.
I think long term moving hagrid to a non python library will help prevent install issues in the global space.
If we do the 1 liner bash script we "could" try to resolve this by installing hagrid in a self contained env and linking it to /usr/local/bin but it all gets a bit complicated.
I think the simplest fix here is that by having the error message in this issue people can find it, and that in future we should create a common errors list somewhere in the docs.