Address Saran's comments.

This commit is contained in:
Kevin Zakka
2022-03-29 10:32:16 -07:00
parent 95350ce482
commit 647fc7770e
2 changed files with 11 additions and 10 deletions
+9 -8
View File
@@ -18,9 +18,9 @@ most users who access MuJoCo through Python. For example, the `egl`, `glfw`, and
## Installation ## Installation
### PyPI ### PyPI (Recommended)
The package can be installed from [PyPI](https://pypi.org/project/mujoco/) via The recommended way to install this package is via [PyPI](https://pypi.org/project/mujoco/):
```sh ```sh
pip install mujoco pip install mujoco
@@ -31,26 +31,27 @@ need to be downloaded or installed separately.
### Source ### Source
**Note.** CMake and a C++17 compiler are needed to build the bindings from source. **Note.** Building from source is only necessary if you are modifying the Python bindings (or are trying to run on exceptionally old Linux systems). If that's not the case, then we recommend installing the prebuilt binaries from PyPI.
1. Download the [latest release](https://github.com/deepmind/mujoco/releases) from GitHub. On macOS, the download corresponds to a DMG file from which you can drag the `MuJoCo` app into your Applications folder. Before proceeding, make sure you have CMake and a C++17 compiler installed.
1. Download the latest release of the [binary archives](https://github.com/deepmind/mujoco/releases) from GitHub. On macOS, the download corresponds to a DMG file from which you can drag the `MuJoCo` app into your Applications folder.
<p align="center"> <p align="center">
<img src="../assets/macos_install.png" width=600> <img src="../assets/macos_install.png" width=600>
</p> </p>
2. Clone the entire mujoco repository from Github and cd into the python directory. 2. Clone the entire `mujoco` repository from GitHub and cd into the python directory.
```bash ```bash
git clone https://github.com/deepmind/mujoco.git git clone https://github.com/deepmind/mujoco.git
cd mujoco/python cd mujoco/python
``` ```
3. Create a virtual environment, for example with conda. 3. Create a virtual environment:
```bash ```bash
conda create -n mujoco python=3.8 python3 -m venv /tmp/mujoco && /tmp/mujoco/bin/activate
conda activate mujoco
``` ```
4. Generate a [source distribution](https://packaging.python.org/en/latest/glossary/#term-Source-Distribution-or-sdist) 4. Generate a [source distribution](https://packaging.python.org/en/latest/glossary/#term-Source-Distribution-or-sdist)
+2 -2
View File
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
if [[ -z ${VIRTUAL_ENV} ]] && [[ -z ${CONDA_DEFAULT_ENV} ]] ; then if [[ -z ${VIRTUAL_ENV} ]] && [[ -z ${CONDA_DEFAULT_ENV} ]]; then
echo "This script must be run from within a Python virtual environment" echo "This script must be run from within a Python virtual environment"
exit 1 exit 1
fi fi
@@ -28,7 +28,7 @@ else
readonly tmp_dir="$(mktemp -d)" readonly tmp_dir="$(mktemp -d)"
fi fi
python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade pip setuptools
python -m pip install absl-py python -m pip install absl-py
pushd ${tmp_dir} pushd ${tmp_dir}
cp -r "${package_dir}"/* . cp -r "${package_dir}"/* .