浏览代码

Added simple check to Python version in notebook.

- Including a few minor comments.
/develop-generalizationTraining-TrainerController
Marwan Mattar 7 年前
当前提交
ffb4ffee
共有 1 个文件被更改,包括 13 次插入3 次删除
  1. 16
      python/Basics.ipynb

16
python/Basics.ipynb


"source": [
"### 1. Set environment parameters\n",
"\n",
"Be sure to set `env_name` to the name of the Unity environment file you want to launch."
"Be sure to set `env_name` to the name of the Unity environment file you want to launch. Ensure that the environment build is in the `python/` directory."
]
},
{

"cell_type": "markdown",
"metadata": {},
"source": [
"### 2. Load dependencies"
"### 2. Load dependencies\n",
"\n",
"The following loads the necessary dependencies and checks the Python version (at runtime). ML-Agents (v0.3 onwards) requires Python 3."
]
},
{

"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import sys\n",
"%matplotlib inline"
"%matplotlib inline\n",
"\n",
"print(\"Python version:\")\n",
"print(sys.version)\n",
"\n",
"# check Python version\n",
"if (sys.version_info[0] < 3):\n",
" raise Exception(\"ERROR: ML-Agents (v0.3 onwards) requires Python 3\")"
]
},
{

正在加载...
取消
保存