-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Update Installation for windows #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
60eadab
6965cb5
56c316d
bb31b87
d9dbede
718585e
9df864d
1814ca1
fb0ada2
886df47
cdef13d
c995fe1
e4d76ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ To use ML-Agents, you install Python and the required Python packages as outline | |
|
|
||
| ## Step 1: Install Python via Anaconda | ||
|
|
||
| [Download](https://www.anaconda.com/download/#windows) and install Anaconda for Windows. By using Anaconda, you can manage separate environments for different distributions of Python. Python 3 is required as we no longer support Python 2. In this guide, we are using Python version 3.6 and Anaconda version 5.1 ([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) direct links). | ||
| [Download](https://www.anaconda.com/download/#windows) and install Anaconda for Windows. By using Anaconda, you can manage separate environments for different distributions of Python. Python 3 is required as we no longer support Python 2. In this guide, we are using Python version 3.5 (Anaconda comes with python 3.6, we will create and environment with python 3.5) and Anaconda version 5.1 ([64-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe) or [32-bit](https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86.exe) direct links). | ||
|
||
|
|
||
| <p align="center"> | ||
| <img src="images/anaconda_install.PNG" | ||
|
|
@@ -23,15 +23,21 @@ We recommend the default _advanced installation options_. However, select the op | |
| </p> | ||
|
|
||
| After installation, you must open __Anaconda Navigator__ to finish the setup. From the Windows search bar, type _anaconda navigator_. You can close Anaconda Navigator after it opens. | ||
|
|
||
| If environmental variables were not created, or if you see the error "conda is not recognized as internal or external command", in System Variables "Path" add: | ||
|
||
| ``` | ||
| C:\ProgramData\Anaconda3\Scripts | ||
| C:\ProgramData\Anaconda3\Scripts\conda.exe | ||
| C:\ProgramData\Anaconda3 | ||
| C:\ProgramData\Anaconda3\python.exe | ||
| ``` | ||
| ## Step 2: Setup and Activate a New Conda Environment | ||
|
|
||
| You will create a new [Conda environment](https://conda.io/docs/) to be used with ML-Agents. This means that all the packages that you install are localized to just this environment. It will not affect any other installation of Python or other environments. Whenever you want to run ML-Agents, you will need activate this Conda environment. | ||
|
|
||
| To create a new Conda environment, open a new Anaconda Prompt (_Anaconda Prompt_ in the search bar) and type in the following command: | ||
|
|
||
| ``` | ||
| conda create -n ml-agents python=3.6 | ||
| conda create -n ml-agents python=3.5 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that we should change it from 3.6 to 3.5 here, since 3.6.5 doesn't work yet. |
||
| ``` | ||
|
|
||
| You may be asked to install new packages. Type `y` and press enter _(make sure you are connected to the internet)_. You must install these required packages. The new Conda environment is called ml-agents and uses Python version 3.6. | ||
|
|
@@ -50,10 +56,10 @@ conda activate ml-agents | |
|
|
||
| You should see `(ml-agents)` prepended on the last line. | ||
|
|
||
| Next, install `tensorflow`. Install this package using `pip` - which is a package management system used to install Python packages. In the same Anaconda Prompt, type in the following command _(make sure you are connected to the internet)_: | ||
| Next, install `tensorflow`. Install this package using `pip` - which is a package management system used to install Python packages. Latest versions of Tensorflow won't work, so you will need to make sure that you install version 1.4.0. In the same Anaconda Prompt, type in the following command _(make sure you are connected to the internet)_: | ||
|
|
||
| ``` | ||
| pip install tensorflow | ||
| pip install tensorflow==1.4.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In our requirement.txt, we already specified tensorflow==1.4.0 version, why would you specify it here again?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some people copy and paste code from tutorials. If done like that conda would install the latest version of TensorFlow and it will ask for CUDA 9.0 later, hence the installation will give an error.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see. |
||
| ``` | ||
|
|
||
| ## Step 3: Install Required Python Packages | ||
|
|
@@ -78,6 +84,7 @@ Make sure you are connected to the internet and then type in the Anaconda Prompt | |
|
|
||
| ``` | ||
| pip install . | ||
|
|
||
| ``` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why will you install docopt again after "pip install ."?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Somehow, the pip install . didn't include docopt and gave an error while training. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same problem on my side, but with pyyaml.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you need Visual Studio Windows SDK 2015 to install pyyaml, also: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I solved it via command: easy_install pyyaml
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good to know. Perhaps all of these issues need to be in a "troubleshooting" page?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't hurt to execute one more command if it get people through.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are planning to add a FAQ page, where we can add this in later. |
||
|
|
||
| This will complete the installation of all the required Python packages to run ML-Agents. | ||
|
|
@@ -90,7 +97,7 @@ As of ML-Agents v0.3, only CUDA 8 and cuDNN 6 is supported. | |
|
|
||
| ### Install Nvidia CUDA toolkit | ||
|
|
||
| [Download](https://developer.nvidia.com/cuda-toolkit-archive) and install the CUDA toolkit from Nvidia's archive. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler and a runtime library and is needed to run ML-Agents. In this guide, we are using version 8.0.61 ([direct link](https://developer.nvidia.com/compute/cuda/8.0/Prod2/network_installers/cuda_8.0.61_win10_network-exe)). | ||
| [Download](https://developer.nvidia.com/cuda-toolkit-archive) and install the CUDA toolkit from Nvidia's archive. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ (Step Visual Studio 2015) compiler and a runtime library and is needed to run ML-Agents. In this guide, we are using version 8.0.61 ([direct link](https://developer.nvidia.com/compute/cuda/8.0/Prod2/network_installers/cuda_8.0.61_win10_network-exe)). | ||
|
|
||
| Before installing, please make sure you __close any running instances of Unity or Visual Studio__. | ||
|
|
||
|
|
@@ -169,7 +176,7 @@ Make sure to replace the relevant directory location with the one you have insta | |
| Next, install `tensorflow-gpu` using `pip`. In an Anaconda Prompt with the Conda environment ml-agents activated, type in the following command _(make sure you are connected to the internet)_: | ||
|
|
||
| ``` | ||
| pip install tensorflow-gpu | ||
| pip install tensorflow-gpu==1.4.0 | ||
| ``` | ||
|
|
||
| Lastly, you should test to see if everything installed properly and that TensorFlow can identify your GPU. In the same Anaconda Prompt, type in the following command: | ||
|
|
@@ -185,6 +192,11 @@ You should see something similar to: | |
| ``` | ||
| Found device 0 with properties ... | ||
| ``` | ||
| <p> | ||
|
||
| Step Visual Studio 2015: CUDA 8.0 is not compatible with Visual Studio 2017, so you will need an older version. Uninstall Visual Studio 2017 that comes with Unity, download Visual Studio Enterprise 2015 and install it with the Windows SDK. If you don't want/ can't install Visual Studio Enterprise 2015, you will need Visual C++ Redistributable for Visual Studio 2015 ([direct link](https://www.microsoft.com/en-us/download/details.aspx?id=48145)) and Visual Studio Community 2015 ([direct link](https://www.visualstudio.com/vs/older-downloads/)) with Windows SDK ([direct link]( https://msdn.microsoft.com/en-us/library/mt683786.aspx)). | ||
|
|
||
| </p> | ||
|
|
||
|
|
||
| ## Acknowledgements | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "activate the ml-agents environment" mean? This would be the only place in the Docs that we mention that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Activate means, "write in the command line 'activate ml-agents'", and the environment that was created before is activated. Tensorflow also needs to be activated.