Before you start following the tutorials, you will need to install PySyft on your computer.
Here are the PySyft installation instructions for Linux, Mac OS, and Windows.
Authors:
- Alan Aboudib - Twitter: @alan_aboudib
Installing PySyft on Linux is really straight forward. Here are the steps:
Get the installation command here (use the pip option) and run it in the terminal.
NOTE: Use exact version 1.4.0
, not just 1.4
. E.g. pip install torch==1.4.0
.
git clone https://github.com/OpenMined/PySyft.git
cd PySyft
python setup.py install
This will install the TF Encrypted dependencies, which are required for running the tutorials from Udacity's "Secure & Private AI" course (recommended). Run:
pip install -r pip-dep/requirements_udacity.txt
python setup.py test
In order to install python on MacOs, you first need to install Homebrew the famous package manager.
Start by opening a terminal and type the following:
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This will install Homebrew. Then, install python (version >= 3.6 < 3.8) by running:
brew install python3
You should first get the installation command here (use the pip option)
Then run that command in the open terminal.
NOTE: Use exact version 1.4.0
, not just 1.4
. E.g. pip install torch==1.4.0
.
git clone https://github.com/OpenMined/PySyft.git
First, you need to enter the PySyft folder you cloned earlier:
cd PySyft
Then, run this to install the PySyft package:
python setup.py install
(Optional)Then install the TF Encrypted dependencies, which are required for running the tutorials from Udacity's "Secure & Private AI" course (recommended). Run:
pip install -r pip-dep/requirements_udacity.txt
You can test your installation by running:
python setup.py test
PySyft requires python version Python >= 3.6 < 3.8
Here is the link to install python www.python.org/downloads
First, you need to find the folder path to which python.exe
and pip3
were installed.
In my case it is:
C:\Users\alan\AppData\Local\Programs\Python\Python37
for the former, and:
C:\Users\alan\AppData\Local\Programs\Python\Python37\Scripts
for the latter. So I will add both paths to the PATH environment variable.
In order to do that, go to Run and type sysdm.cpl
and press Enter. The following window should open:
Click on the Environment Variables...
button in the bottom-right corner. The following window should appear:
Select the Path row in the System varibles
section as in the above screenshot and click on Edit...
In the window that opens, click on New
and add the installation paths for python.exe
and pip
. Here is an example:
Click on OK
.
You should first get the installation command here (use the pip option)
NOTE: Use exact version 1.4.0
, not just 1.4
. E.g. pip install torch==1.4.0
.
Then open the command prompt by going to Run and typing cmd, type or paste the pytorch installation command you got from the above link and press Enter.
Here is the download link for Git on windows: git-scm.com/download/win
Go to the download page and click on Free download
under Community in the Visual Studio download section. This is illustrated in the following screenshot:
After the download is finished, run the downloaded package. You will eventually get the following window:
Select Desktop development with C++
and click on Install
at the bottom-right corner of the page. (In the above screenshot you see a Close
button instead since I have already installed it.)
Wait until the the install has finished.
git clone https://github.com/OpenMined/PySyft.git
First, you need to enter the PySyft folder you cloned earlier:
cd PySyft
Then
python setup.py install
This will install PySyft and its requirements to your system. You should see no errors.
(Optional)Then install the TF Encrypted dependencies, which are required for running the tutorials from Udacity's "Secure & Private AI" course (recommended).
pip install -r pip-dep/requirements_udacity.txt
You can also test your installation by running:
python setup.py test
If installation is not working for you, please tell us about your issue on our slack channel (slack.openmined.org)
We will do our best to help!!