본문 바로가기
개발/개발 팁

파이썬과(Python) 파이시프트(PySyft) 설치방법 알아보기

by 낭만기사 2021. 3. 4.
반응형

PySyft에는 Python 버전이 필요합니다. (Python> = 3.6 <3.8)

1. 다음은 Python을 다운로드 받을수 있는 주소 입니다. www.python.org/downloads

 

Download Python

The official home of the Python Programming Language

www.python.org

2. 사용자에 해당되는 운영체제를 선택하여 다운로드 합니다. 윈도우 사용자는 인스톨러를 다운받습니다.

파이썬 다운로드

3. 환경변수 설정을 해주는 Add Python 3.7 to PATH 를 선택하여 Install Now 로 설치를 시작합니다.

파이썬 설치과정1

파이썬 설치가 완료 됩니다.

파이썬 설치과정 2

4. 파이썬이 정상적으로 실행되지 않았다면 윈도우 환경변수를 추가 합니다.  (Add python and pip to the PATH environment variable)

윈도우 환경 변수 추가1

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:

 

윈도우 환경 변수 추가2

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:

 

윈도우 환경 변수 추가3

Click on OK

 

5. Install PyTorch 1.4 & Git

Install PyTorch 1.4

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.

 

Install Git

Here is the download link for Git on windows: git-scm.com/download/win

 

6. Install Microsoft Build tools

비쥬얼 스튜디오 설치

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:

비쥬얼 스튜디오 설치2

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.)

 

7. Install PySyft

//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
반응형