# Pyenv

{% hint style="warning" %}
Pyenv 在 MacOS 上安装 Python 版本有些许不一样
{% endhint %}

```
PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.6.0
```

如果不适用上面的 `PYTHON_CONFIGURE_OPTS="--enable-framework"` 会在后序流程中出现如下错误

```
OSError: Python library not found: Python, .Python, libpython3.6m.dylib, libpython3.6.dylib
This would mean your Python installation doesn't come with proper library files.
This usually happens by missing development package, or unsuitable build parameters of Python installation.

* On Debian/Ubuntu, you would need to install Python development packages
  * apt-get install python3-dev
  * apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mm.ricky.moe/backend/python/pyenv.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
