[ml-agent] Installation

Unity3D/ml-agent 2019. 5. 27. 21:11
반응형

 

1. Unity설치 (Linux Build Support모듈 추가)

 

2. Anaconda 버전 5.1 설치 (64비트)

https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Installation-Windows.md

3. anaconda-navigator 실행 

C:\Users\smile\Anaconda3\Scripts\anaconda-navigator.exe

 

4. 시스템 환경 변수 설정 (Path에 추가)

%UserProfile%\Anaconda3\Scripts
%UserProfile%\Anaconda3\Scripts\conda.exe
%UserProfile%\Anaconda3
%UserProfile%\Anaconda3\python.exe

 

5. Anaconda Prompt (Anaconda Prompt)를 열고 다음 명령을 입력 (새 피키지를 설치하라고 하면 y, 인터넷 연결필수)

conda create -n ml-agents python=3.6

 

 

6. 환경 사용을 위해 다음 명령어를 입력 

activate ml-agents

 

 

7. 다음으로 tensorflow를 설치하십시오. Python 패키지를 설치하는 데 사용되는 패키지 관리 시스템 인 pip -를 사용하여이 패키지를 설치하십시오.

pip install tensorflow==1.7.1

 

8. ML-Agents 툴킷은 다수의 Python 패키지에 의존합니다. pip를 사용하여 이러한 Python 종속성을 설치하십시오.

ML-Agents Toolkit Github 저장소를 로컬 컴퓨터에 복제하지 않은 경우 복제하십시오.

Git (여기에서 다운로드)을 사용하고 Anaconda 프롬프트에서 다음 명령을 실행하여 수행 할 수 있습니다 (새 프롬프트를 여는 경우 activate ml-agent를 입력하여 ml-agents Conda 환경을 활성화해야 함).

git clone https://github.com/Unity-Technologies/ml-agents.git

 

9. mlagents-learn을 실행할 때이 디렉토리에 트레이너 구성 파일이 필요하므로 파일을 다운로드 한 위치를 기억하십시오. 인터넷에 연결되어 있는지 확인한 다음 Anaconda 프롬프트를 입력하십시오.

pip install mlagents

이렇게하면 ML-Agents 툴킷을 실행하는 데 필요한 모든 Python 패키지의 설치가 완료됩니다.

 

ERROR: mlagents-envs 0.8.1 has requirement Pillow<=5.4.1,>=4.2.1, but you'll have pillow 6.0.0 which is incompatible.

https://github.com/Unity-Technologies/ml-agents/issues/1939

I faced the same issue but downgrading Pillow to 5.4.1 helped.
I performed the following operations:

pip uninstall pillow==6.0.0

And then

pip install pillow==5.4.1

 

때때로 Windows에서 pip를 사용하여 특정 Python 패키지를 설치하면 패키지의 캐시를 읽으려고 할 때 pip가 멈추는 경우가 있습니다. 이 메시지가 표시되면 다음을 시도 할 수 있습니다.

 

pip install mlagents --no-cache-dir

 

10. ml-agents 또는 ml-agent-envs를 수정하려면 PyPi가 아닌 복제 된 Repo에서 패키지를 설치해야합니다.

이를 위해서는 ml-agents와 ml-agent-envs를 별도로 설치해야합니다.ml-agents 또는 ml-agent-envs를 수정하려면 PyPi가 아닌 복제 된 Repo에서 패키지를 설치해야합니다. 이를 위해서는 ml-agents와 ml-agent-envs를 별도로 설치해야합니다. 이 예에서 파일은 C : \ Downloads에 있습니다. 파일을 복제하거나 다운로드 한 후 Anaconda 프롬프트에서 ml-agents 디렉토리 내의 ml-agents 서브 디렉토리로 변경하십시오.

 

clone 받은 디렉토리로 이동 

D:\workspace\unity\git>cd ml-agents

 

repo의 메인 디렉토리에서 다음을 실행하십시오 :

cd ml-agents-envs

pip install -e .

cd ..

cd ml-agents pip install -e .

pip를 -e 플래그와 함께 실행하면 파이썬 파일을 직접 변경할 수 있으며 mlagents-learn을 실행할 때 반영됩니다. mlagents 패키지가 mlagents_envs에 종속되므로이 패키지를이 순서로 설치하는 것이 중요하며 다른 순서로 설치하면 PyPi에서 mlagents_envs가 다운로드됩니다.

 

 

끝 

 

 

참고: https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Installation-Windows.md

 

Unity-Technologies/ml-agents

Unity Machine Learning Agents Toolkit. Contribute to Unity-Technologies/ml-agents development by creating an account on GitHub.

github.com

 

Mac OS

 

1. ml-agent 검색후 github로 이동 

https://github.com/Unity-Technologies/ml-agents

2. 터미널을 열고 프로젝트 클론 받기 

3. python3.6 설치 
https://www.python.org/downloads/release/python-368/

 

4. pip 업그레이드 하기 

pip3 install --upgrade pip

5. ml-agents/ml-agents/ 아래 명령어 실행해서 의존 라이브러리 설치 

pip3 install -e .

 

 

6. 터미널을 새로 열고 ml-agents/ 폴더로 이동후 아래 명령어를 실행 

mlagents-learn --help

 

7. Unity Hub 에서 Linux Build Support 모듈 추가 

 

 

참고 : https://youtu.be/twcmguIedhY?list=PLctzObGsrjfwYHL1obWlVdPRbpubkuKWp

반응형

'Unity3D > ml-agent' 카테고리의 다른 글

[ml-agent] Learning-Environment-Create-New  (0) 2019.05.30
[ml-agent] Training config file  (0) 2019.05.30
[ml-agent] Agents  (0) 2019.05.28
[ml-agent] Basic Guide  (0) 2019.05.27
[ml-agent] Background: Jupyter Notebooks  (0) 2019.05.27
: