Anupam Bhatnagar
5 年前
当前提交
2cd2048b
共有 5 个文件被更改,包括 43 次插入 和 24 次删除
-
9docs/Readme.md
-
6docs/Training-ML-Agents.md
-
2docs/Using-Tensorboard.md
-
33docs/Using-Virtual-Environment.md
-
17docs/Python-venv.md
|
|||
# Using Virtual Environment |
|||
|
|||
## What is a Virtual Environment? |
|||
A Python Virtual Environment is an isolated workspace for Python projects. |
|||
|
|||
## Why should I use a Virtual Environment? |
|||
A Virtual Environment keeps all dependencies for the project separate from dependencies |
|||
of other projects. This has two advantages: |
|||
1. Firstly, it makes dependency management for the project easy. |
|||
1. Secondly, it enables using and testing of different library versions by quickly |
|||
spinning up a new environment and verifying the compatibility of the code with the |
|||
different version. |
|||
|
|||
Requirement - Python 3.6 must be installed on the installed on the machine you would like |
|||
to run ML-Agents on (either local laptop/desktop or remote server). Python 3.6 can be |
|||
installed from [here](https://www.python.org/downloads/). |
|||
|
|||
## Mac OS X Setup |
|||
|
|||
1. Create a folder where the virtual environments will live ` $ mkdir ~/python-venvs ` |
|||
1. To create a new environment named `test-env` execute `$ python3 -m venv ~/python-envs/test-env` |
|||
1. To activate the environment execute `$ source ~/python-envs/test-env/bin/activate` |
|||
1. Install ML-Agents package using `$ pip3 install mlagents` |
|||
1. To deactivate the environment execute `$ deactivate ` |
|||
|
|||
## Ubuntu Setup |
|||
|
|||
1. Install the python3-venv package using `$ sudo apt-get install python3-venv` |
|||
1. Now follow the steps in the Mac OS X installation. |
|||
|
|||
## Windows Setup |
|||
|
|||
Coming Soon. |
|
|||
# Installing and Running ML-Agents in a virtual environment |
|||
|
|||
__Requirement - Python 3.6 must be installed on the server. Python 3.6 can be [here](https://www.python.org/downloads/)__ |
|||
|
|||
## Mac OS X Setup |
|||
|
|||
1. Create a folder where the virtual environments will live ` $ mkdir ~/python-venvs ` |
|||
1. To create a new environment named `test-env` execute `$ python3 -m venv ~/python-envs/test-env` |
|||
1. To activate the environment execute `$ source ~/python-envs/test-env/bin/activate` |
|||
1. Install ML-Agents package using `$ pip3 install mlagents` |
|||
1. To deactivate the environment execute `$ deactivate ` |
|||
|
|||
## Ubuntu Setup |
|||
|
|||
1. Install the python3-venv package using `$ sudo apt-get install python3-venv` |
|||
|
|||
Now follow the steps in the Mac OS X installation. |
撰写
预览
正在加载...
取消
保存
Reference in new issue