Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

609 lignes
23 KiB

il y a 9 ans
il y a 12 ans
il y a 12 ans
il y a 11 ans
il y a 12 ans
il y a 12 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 7 ans
il y a 11 ans
il y a 9 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 2 ans
il y a 11 ans
il y a 11 ans
il y a 12 ans
il y a 12 ans
il y a 12 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 11 ans
il y a 12 ans
il y a 13 ans
il y a 13 ans
  1. # Simple Python Version Management: pyenv
  2. [![Join the chat at https://gitter.im/yyuu/pyenv](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/yyuu/pyenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  3. pyenv lets you easily switch between multiple versions of Python. It's
  4. simple, unobtrusive, and follows the UNIX tradition of single-purpose
  5. tools that do one thing well.
  6. This project was forked from [rbenv](https://github.com/rbenv/rbenv) and
  7. [ruby-build](https://github.com/rbenv/ruby-build), and modified for Python.
  8. ![Terminal output example](/terminal_output.png)
  9. ### what pyenv _does..._
  10. * Lets you **change the global Python version** on a per-user basis.
  11. * Provides support for **per-project Python versions**.
  12. * Allows you to **override the Python version** with an environment
  13. variable.
  14. * Searches for commands from **multiple versions of Python at a time**.
  15. This may be helpful to test across Python versions with [tox](https://pypi.python.org/pypi/tox).
  16. ### In contrast with pythonbrew and pythonz, pyenv _does not..._
  17. * **Depend on Python itself.** pyenv was made from pure shell scripts.
  18. There is no bootstrap problem of Python.
  19. * **Need to be loaded into your shell.** Instead, pyenv's shim
  20. approach works by adding a directory to your `$PATH`.
  21. * **Manage virtualenv.** Of course, you can create [virtualenv](https://pypi.python.org/pypi/virtualenv)
  22. yourself, or [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)
  23. to automate the process.
  24. ----
  25. ## Table of Contents
  26. * **[How It Works](#how-it-works)**
  27. * [Understanding PATH](#understanding-path)
  28. * [Understanding Shims](#understanding-shims)
  29. * [Choosing the Python Version](#choosing-the-python-version)
  30. * [Locating the Python Installation](#locating-the-python-installation)
  31. * **[Installation](#installation)**
  32. * [Prerequisites](#prerequisites)
  33. * [Homebrew in macOS](#homebrew-in-macos)
  34. * [Windows](#windows)
  35. * [Automatic installer](#automatic-installer)
  36. * [Basic GitHub Checkout](#basic-github-checkout)
  37. * [Upgrading](#upgrading)
  38. * [Homebrew on macOS](#homebrew-on-macos)
  39. * [Advanced Configuration](#advanced-configuration)
  40. * [Uninstalling Python Versions](#uninstalling-python-versions)
  41. * **[Command Reference](#command-reference)**
  42. * **[Development](#development)**
  43. * [Version History](#version-history)
  44. * [License](#license)
  45. ----
  46. ## How It Works
  47. At a high level, pyenv intercepts Python commands using shim
  48. executables injected into your `PATH`, determines which Python version
  49. has been specified by your application, and passes your commands along
  50. to the correct Python installation.
  51. ### Understanding PATH
  52. When you run a command like `python` or `pip`, your operating system
  53. searches through a list of directories to find an executable file with
  54. that name. This list of directories lives in an environment variable
  55. called `PATH`, with each directory in the list separated by a colon:
  56. /usr/local/bin:/usr/bin:/bin
  57. Directories in `PATH` are searched from left to right, so a matching
  58. executable in a directory at the beginning of the list takes
  59. precedence over another one at the end. In this example, the
  60. `/usr/local/bin` directory will be searched first, then `/usr/bin`,
  61. then `/bin`.
  62. ### Understanding Shims
  63. pyenv works by inserting a directory of _shims_ at the front of your
  64. `PATH`:
  65. $(pyenv root)/shims:/usr/local/bin:/usr/bin:/bin
  66. Through a process called _rehashing_, pyenv maintains shims in that
  67. directory to match every Python command across every installed version
  68. of Python—`python`, `pip`, and so on.
  69. Shims are lightweight executables that simply pass your command along
  70. to pyenv. So with pyenv installed, when you run, say, `pip`, your
  71. operating system will do the following:
  72. * Search your `PATH` for an executable file named `pip`
  73. * Find the pyenv shim named `pip` at the beginning of your `PATH`
  74. * Run the shim named `pip`, which in turn passes the command along to
  75. pyenv
  76. ### Choosing the Python Version
  77. When you execute a shim, pyenv determines which Python version to use by
  78. reading it from the following sources, in this order:
  79. 1. The `PYENV_VERSION` environment variable (if specified). You can use
  80. the [`pyenv shell`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-shell) command to set this environment
  81. variable in your current shell session.
  82. 2. The application-specific `.python-version` file in the current
  83. directory (if present). You can modify the current directory's
  84. `.python-version` file with the [`pyenv local`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-local)
  85. command.
  86. 3. The first `.python-version` file found (if any) by searching each parent
  87. directory, until reaching the root of your filesystem.
  88. 4. The global `$(pyenv root)/version` file. You can modify this file using
  89. the [`pyenv global`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global) command. If the global version
  90. file is not present, pyenv assumes you want to use the "system"
  91. Python. (In other words, whatever version would run if pyenv weren't in your
  92. `PATH`.)
  93. **NOTE:** You can activate multiple versions at the same time, including multiple
  94. versions of Python2 or Python3 simultaneously. This allows for parallel usage of
  95. Python2 and Python3, and is required with tools like `tox`. For example, to set
  96. your path to first use your `system` Python and Python3 (set to 2.7.9 and 3.4.2
  97. in this example), but also have Python 3.3.6, 3.2, and 2.5 available on your
  98. `PATH`, one would first `pyenv install` the missing versions, then set `pyenv
  99. global system 3.3.6 3.2 2.5`. At this point, one should be able to find the full
  100. executable path to each of these using `pyenv which`, e.g. `pyenv which python2.5`
  101. (should display `$(pyenv root)/versions/2.5/bin/python2.5`), or `pyenv which
  102. python3.4` (should display path to system Python3). You can also specify multiple
  103. versions in a `.python-version` file, separated by newlines.
  104. Lines starting with a `#` are ignored.
  105. ### Locating the Python Installation
  106. Once pyenv has determined which version of Python your application has
  107. specified, it passes the command along to the corresponding Python
  108. installation.
  109. Each Python version is installed into its own directory under
  110. `$(pyenv root)/versions`.
  111. For example, you might have these versions installed:
  112. * `$(pyenv root)/versions/2.7.8/`
  113. * `$(pyenv root)/versions/3.4.2/`
  114. * `$(pyenv root)/versions/pypy-2.4.0/`
  115. As far as Pyenv is concerned, version names are simply directories under
  116. `$(pyenv root)/versions`.
  117. ### Managing Virtual Environments
  118. There is a pyenv plugin named [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv) which comes with various features to help pyenv users to manage virtual environments created by virtualenv or Anaconda.
  119. Because the `activate` script of those virtual environments are relying on mutating `$PATH` variable of user's interactive shell, it will intercept pyenv's shim style command execution hooks.
  120. We'd recommend to install pyenv-virtualenv as well if you have some plan to play with those virtual environments.
  121. ----
  122. ## Installation
  123. ### Prerequisites
  124. For pyenv to install python correctly you should [**install the Python build dependencies**](https://github.com/pyenv/pyenv/wiki#suggested-build-environment).
  125. ### Homebrew in macOS
  126. 1. Consider installing with [Homebrew](https://brew.sh):
  127. ```sh
  128. brew update
  129. brew install pyenv
  130. ```
  131. 2. Then follow the rest of the post-installation steps under [Basic GitHub Checkout](https://github.com/pyenv/pyenv#basic-github-checkout), starting with #2 ("Configure your shell's environment for Pyenv").
  132. 3. OPTIONAL. To fix `brew doctor`'s warning _""config" scripts exist outside your system or Homebrew directories"_
  133. If you're going to build Homebrew formulae from source that link against `libpython`
  134. like Tkinter or NumPy
  135. _(This is only generally the case if you are a developer of such a formula,
  136. or if you have an EOL version of MacOS for which prebuilt bottles are no longer available
  137. and are using such a formula)._
  138. To avoid them accidentally linking against a Pyenv-provided Python,
  139. add the following line into your interactive shell's configuration:
  140. * Bash/Zsh:
  141. ~~~bash
  142. alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
  143. ~~~
  144. * Fish:
  145. ~~~fish
  146. alias brew="env PATH=(string replace (pyenv root)/shims '' \"\$PATH\") brew"
  147. ~~~
  148. ### Windows
  149. Pyenv does not officially support Windows and does not work in Windows outside
  150. the Windows Subsystem for Linux.
  151. Moreover, even there, the Pythons it installs are not native Windows versions
  152. but rather Linux versions run through a compatibility layer --
  153. so you won't get Windows-specific functionality.
  154. If you're in Windows, we recommend using @kirankotari's [`pyenv-win`](https://github.com/pyenv-win/pyenv-win) fork --
  155. which does install native Windows Python versions.
  156. ### Automatic installer
  157. Visit our other project:
  158. https://github.com/pyenv/pyenv-installer
  159. ### Basic GitHub Checkout
  160. This will get you going with the latest version of Pyenv and make it
  161. easy to fork and contribute any changes back upstream.
  162. 1. **Check out Pyenv where you want it installed.**
  163. A good place to choose is `$HOME/.pyenv` (but you can install it somewhere else):
  164. git clone https://github.com/pyenv/pyenv.git ~/.pyenv
  165. Optionally, try to compile a dynamic Bash extension to speed up Pyenv. Don't
  166. worry if it fails; Pyenv will still work normally:
  167. cd ~/.pyenv && src/configure && make -C src
  168. 2. **Configure your shell's environment for Pyenv**
  169. **Note:** The below instructions for specific shells are designed for common shell setups;
  170. they also install shell functions into interactive shells only.
  171. If you have an uncommon setup and/or needs and they don't work for you,
  172. use the [Advanced Configuration](#advanced-configuration)
  173. section below to figure out what you need to do in your specific case.
  174. **General MacOS note:**
  175. [Make sure that your terminal app is configured to run the shell as a login shell](https://github.com/pyenv/pyenv/wiki/MacOS-login-shell)
  176. (especially if you're using an alternative terminal app and/or shell).
  177. The configuration samples for MacOS are written under this assumption and won't work otherwise.
  178. - For **Bash**:
  179. - **If your `~/.profile` sources `~/.bashrc` (Debian, Ubuntu, Mint):**
  180. ~~~bash
  181. # the sed invocation inserts the lines at the start of the file
  182. # after any initial comment lines
  183. sed -Ei -e '/^([^#]|$)/ {a \
  184. export PYENV_ROOT="$HOME/.pyenv"
  185. a \
  186. export PATH="$PYENV_ROOT/bin:$PATH"
  187. a \
  188. ' -e ':a' -e '$!{n;ba};}' ~/.profile
  189. echo 'eval "$(pyenv init --path)"' >>~/.profile
  190. echo 'eval "$(pyenv init -)"' >> ~/.bashrc
  191. ~~~
  192. - **If your `~/.bash_profile` sources `~/.bashrc` (Red Hat, Fedora, CentOS):**
  193. ~~~ bash
  194. sed -Ei -e '/^([^#]|$)/ {a \
  195. export PYENV_ROOT="$HOME/.pyenv"
  196. a \
  197. export PATH="$PYENV_ROOT/bin:$PATH"
  198. a \
  199. ' -e ':a' -e '$!{n;ba};}' ~/.bash_profile
  200. echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
  201. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
  202. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
  203. echo 'eval "$(pyenv init --path)"' >> ~/.profile
  204. echo 'eval "$(pyenv init -)"' >> ~/.bashrc
  205. ~~~
  206. - **If you have no `~/.bash_profile` and your `/etc/profile` sources `~/.bashrc` (SUSE):**
  207. ~~~bash
  208. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
  209. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
  210. echo 'eval "$(pyenv init --path)"' >> ~/.profile
  211. echo 'if command -v pyenv >/dev/null; then eval "$(pyenv init -)"; fi' >> ~/.bashrc
  212. ~~~
  213. - **Otherwise if you have no stock `~/.profile` or `~/.bash_profile` (MacOS):**
  214. ~~~bash
  215. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
  216. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
  217. echo 'eval "$(pyenv init --path)"' >> ~/.profile
  218. echo 'if [ -n "$PS1" -a -n "$BASH_VERSION" ]; then source ~/.bashrc; fi' >> ~/.profile
  219. echo 'eval "$(pyenv init -)"' >> ~/.bashrc
  220. ~~~
  221. In MacOS, make sure that your terminal app runs the shell as a login shell.
  222. - **Temporary environments (CI, Docker, batch jobs):**
  223. In CI/build environments, paths and the environment are usually already set up for you
  224. in one of the above ways.
  225. You may only need to install Pyenv as a shell function into the (noninteractive) shell
  226. that runs the batch script, and only if you need subcommands that require `pyenv`
  227. to be a shell function (e.g. `shell` and Pyenv-Virtualenv's `activate`).
  228. ~~~bash
  229. echo 'eval "$(pyenv init -)"'
  230. ~~~
  231. If you are installing Pyenv yourself as part of the batch job,
  232. after installing the files, run the following in the job's shell
  233. to be able to use it.
  234. ~~~bash
  235. export PYENV_ROOT="$HOME/.pyenv"
  236. export PATH="$PYENV_ROOT/bin:$PATH" # if `pyenv` is not already on PATH
  237. eval "$(pyenv init --path)"
  238. eval "$(pyenv init -)"
  239. ~~~
  240. **General Bash warning**: There are some systems where the `BASH_ENV` variable is configured
  241. to point to `.bashrc`. On such systems, you should almost certainly put the
  242. `eval "$(pyenv init -)"` line into `.bash_profile`, and **not** into `.bashrc`. Otherwise, you
  243. may observe strange behaviour, such as `pyenv` getting into an infinite loop.
  244. See [#264](https://github.com/pyenv/pyenv/issues/264) for details.
  245. - For **Zsh**:
  246. - **MacOS, if Pyenv is installed with Homebrew:**
  247. ~~~ zsh
  248. echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
  249. echo 'eval "$(pyenv init -)"' >> ~/.zshrc
  250. ~~~
  251. Make sure that your terminal app runs the shell as a login shell.
  252. - **MacOS, if Pyenv is installed with a Git checkout:**
  253. ~~~ zsh
  254. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile
  255. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile
  256. echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
  257. echo 'eval "$(pyenv init -)"' >> ~/.zshrc
  258. ~~~
  259. Make sure that your terminal app runs the shell as a login shell.
  260. - **Other OSes:**
  261. ~~~ zsh
  262. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile
  263. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile
  264. echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
  265. echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
  266. echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
  267. echo 'eval "$(pyenv init --path)"' >> ~/.profile
  268. echo 'eval "$(pyenv init -)"' >> ~/.zshrc
  269. ~~~
  270. - For **Fish shell**:
  271. Execute this interactively:
  272. ~~~ fish
  273. set -Ux PYENV_ROOT $HOME/.pyenv
  274. set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths
  275. ~~~
  276. And add this to `~/.config/fish/config.fish`:
  277. ~~~ fish
  278. status is-login; and pyenv init --path | source
  279. status is-interactive; and pyenv init - | source
  280. ~~~
  281. If Fish is not your login shell, also follow the Bash/Zsh instructions to add to `~/.profile`.
  282. **Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too.
  283. 4. **Restart your login session for the changes to profile files to take effect.**
  284. E.g. if you're in a GUI session, you need to fully log out and log back in.
  285. In MacOS, restarting terminal windows is enough (because MacOS runs shells
  286. in them as login shells by default).
  287. 5. [**Install Python build dependencies**](https://github.com/pyenv/pyenv/wiki#suggested-build-environment) before attempting to install a new Python version.
  288. 6. **Install Python versions into `$(pyenv root)/versions`.**
  289. For example, to download and install Python 2.7.8, run:
  290. ```sh
  291. pyenv install 2.7.8
  292. ```
  293. **NOTE:** If you need to pass a `configure` option to a build, please use the
  294. ```CONFIGURE_OPTS``` environment variable.
  295. **NOTE:** If you want to use proxy to download, please set the `http_proxy` and `https_proxy`
  296. environment variables.
  297. **NOTE:** If you are having trouble installing a Python version,
  298. please visit the wiki page about
  299. [Common Build Problems](https://github.com/pyenv/pyenv/wiki/Common-build-problems).
  300. #### Upgrading
  301. If you've installed Pyenv using Homebrew, upgrade using:
  302. ```sh
  303. brew upgrade pyenv
  304. ```
  305. If you've installed Pyenv using the instructions above, you can
  306. upgrade your installation at any time using Git.
  307. To upgrade to the latest development version of pyenv, use `git pull`:
  308. ```sh
  309. cd $(pyenv root)
  310. git pull
  311. ```
  312. To upgrade to a specific release of Pyenv, check out the corresponding tag:
  313. ```sh
  314. cd $(pyenv root)
  315. git fetch
  316. git tag
  317. git checkout v0.1.0
  318. ```
  319. ### Uninstalling pyenv
  320. The simplicity of pyenv makes it easy to temporarily disable it, or
  321. uninstall from the system.
  322. 1. To **disable** Pyenv managing your Python versions, simply remove the
  323. `pyenv init` invocations from your shell startup configuration. This will
  324. remove Pyenv shims directory from `PATH`, and future invocations like
  325. `python` will execute the system Python version, as it was before Pyenv.
  326. `pyenv` will still be accessible on the command line, but your Python
  327. apps won't be affected by version switching.
  328. 2. To completely **uninstall** Pyenv, remove _all_ configuration lines for it
  329. from your shell startup configuration, and then remove
  330. its root directory. This will **delete all Python versions** that were
  331. installed under `` $(pyenv root)/versions/ `` directory:
  332. ```sh
  333. rm -rf $(pyenv root)
  334. ```
  335. If you've installed Pyenv using a package manager, as a final step,
  336. perform the Pyenv package removal. For instance, for Homebrew:
  337. ```
  338. brew uninstall pyenv
  339. ```
  340. ### Advanced Configuration
  341. Skip this section unless you must know what every line in your shell
  342. profile is doing.
  343. `pyenv init` is the only command that crosses the line of loading
  344. extra commands into your shell. Coming from RVM, some of you might be
  345. opposed to this idea.
  346. Also see the [Environment variables](#environment-variables) section
  347. for the environment variables that control Pyenv's behavior.
  348. * `eval "$(pyenv init --path)"`:
  349. 1. **Sets up your shims path.** This is the only requirement for pyenv to
  350. function properly. You can do this by hand by prepending
  351. `$(pyenv root)/shims` to your `$PATH`.
  352. `eval "$(pyenv init --path)"` is supposed to be run in your session's login
  353. shell startup script -- so that all processes in the session get access to
  354. Pyenv's functionality and it only runs once,
  355. avoiding breaking `PATH` in nested shells
  356. (e.g. shells started from editors/IDEs).
  357. In Linux, GUI managers typically act as a `sh` login shell, running
  358. `/etc/profile` and `~/.profile` at their startup. MacOS' GUI doesn't do that,
  359. so its terminal emulator apps run their shells as login shells by default
  360. to compensate.
  361. * `eval "$(pyenv init -)"`:
  362. 1. **Installs autocompletion.** This is entirely optional but pretty
  363. useful. Sourcing `$(pyenv root)/completions/pyenv.bash` will set that
  364. up. There is also a `$(pyenv root)/completions/pyenv.zsh` for Zsh
  365. users.
  366. 2. **Rehashes shims.** From time to time you'll need to rebuild your
  367. shim files. Doing this on init makes sure everything is up to
  368. date. You can always run `pyenv rehash` manually.
  369. 3. **Installs `pyenv` into the current shell as a shell function.**
  370. This bit is also optional, but allows
  371. pyenv and plugins to change variables in your current shell, making
  372. commands like `pyenv shell` possible. The sh dispatcher doesn't do
  373. anything crazy like override `cd` or hack your shell prompt, but if
  374. for some reason you need `pyenv` to be a real script rather than a
  375. shell function, you can safely skip it.
  376. `eval "$(pyenv init -)"` is supposed to run at any interactive shell's
  377. startup (including nested shells) so that you get completion and
  378. convenience shell functions.
  379. To see exactly what happens under the hood for yourself, run `pyenv init -`
  380. or `pyenv init --path`.
  381. If you don't want to use `pyenv init` and shims, you can still benefit
  382. from pyenv's ability to install Python versions for you. Just run
  383. `pyenv install` and you will find versions installed in
  384. `$(pyenv root)/versions`, which you can manually execute or symlink
  385. as required.
  386. ### Uninstalling Python Versions
  387. As time goes on, you will accumulate Python versions in your
  388. `$(pyenv root)/versions` directory.
  389. To remove old Python versions, `pyenv uninstall` command to automate
  390. the removal process.
  391. Alternatively, simply `rm -rf` the directory of the version you want
  392. to remove. You can find the directory of a particular Python version
  393. with the `pyenv prefix` command, e.g. `pyenv prefix 2.6.8`.
  394. ----
  395. ## Command Reference
  396. See [COMMANDS.md](COMMANDS.md).
  397. ----
  398. ## Environment variables
  399. You can affect how pyenv operates with the following settings:
  400. name | default | description
  401. -----|---------|------------
  402. `PYENV_VERSION` | | Specifies the Python version to be used.<br>Also see [`pyenv shell`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-shell)
  403. `PYENV_ROOT` | `~/.pyenv` | Defines the directory under which Python versions and shims reside.<br>Also see `pyenv root`
  404. `PYENV_DEBUG` | | Outputs debug information.<br>Also as: `pyenv --debug <subcommand>`
  405. `PYENV_HOOK_PATH` | [_see wiki_][hooks] | Colon-separated list of paths searched for pyenv hooks.
  406. `PYENV_DIR` | `$PWD` | Directory to start searching for `.python-version` files.
  407. `PYTHON_BUILD_ARIA2_OPTS` | | Used to pass additional parameters to [`aria2`](https://aria2.github.io/).<br>If the `aria2c` binary is available on PATH, pyenv uses `aria2c` instead of `curl` or `wget` to download the Python Source code. If you have an unstable internet connection, you can use this variable to instruct `aria2` to accelerate the download.<br>In most cases, you will only need to use `-x 10 -k 1M` as value to `PYTHON_BUILD_ARIA2_OPTS` environment variable
  408. ## Development
  409. The pyenv source code is [hosted on
  410. GitHub](https://github.com/pyenv/pyenv). It's clean, modular,
  411. and easy to understand, even if you're not a shell hacker.
  412. Tests are executed using [Bats](https://github.com/bats-core/bats-core):
  413. bats test
  414. bats/test/<file>.bats
  415. Please feel free to submit pull requests and file bugs on the [issue
  416. tracker](https://github.com/pyenv/pyenv/issues).
  417. [pyenv-virtualenv]: https://github.com/pyenv/pyenv-virtualenv#readme
  418. [hooks]: https://github.com/pyenv/pyenv/wiki/Authoring-plugins#pyenv-hooks
  419. ### Version History
  420. See [CHANGELOG.md](CHANGELOG.md).
  421. ### License
  422. [The MIT License](LICENSE)