1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-15 14:53:53 -05:00

cleanup info duplicating Home#suggested-build-enviornment

native-api
2021-05-09 22:36:54 +03:00
parent 986efcb2fe
commit 4e7de5efe5

@@ -1,83 +1,54 @@
# Prerequisites
Make sure to follow this guidance for your platform before any troubleshooting.
Make sure to have installed Python's binary dependencies and build tools as per https://github.com/pyenv/pyenv/wiki#suggested-build-environment before any troubleshooting.
Below are some alternatives to those
* Ubuntu/Debian:
```sh
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
```
Alternative of libreadline-dev:
```sh
sudo apt install libedit-dev
```
* Alternative of libreadline-dev:
```sh
sudo apt install libedit-dev
```
* An [inferior alternative](https://github.com/docker-library/python/issues/235) for `libncursesw` if it's not available:
```sh
sudo apt install libncurses5-dev
```
* Fedora/CentOS/RHEL(aws ec2):
```sh
sudo yum install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite \
sqlite-devel openssl-devel xz xz-devel libffi-devel findutils
```
Alternative of openssl-devel:
```sh
sudo yum install compat-openssl10-devel --allowerasing
```
* Alternative of openssl-devel:
```sh
sudo yum install compat-openssl10-devel --allowerasing
```
* openSUSE
```sh
zypper in zlib-devel bzip2 libbz2-devel libffi-devel libopenssl-devel \
readline-devel sqlite3 sqlite3-devel xz xz-devel
```
For building Python versions from source with OpenSUSE you need the packages in pattern `devel_basis`
For building Python versions from source with OpenSUSE you need the packages in pattern `devel_basis`
```sh
zypper in -t pattern devel_basis
```
* Alpine
```sh
apk add --no-cache bzip2-dev coreutils dpkg-dev dpkg expat-dev \
findutils gcc gdbm-dev libc-dev libffi-dev libnsl-dev libtirpc-dev \
linux-headers make ncurses-dev openssl-dev pax-utils readline-dev \
sqlite-dev tcl-dev tk tk-dev util-linux-dev xz-dev zlib-dev
```
For installing Pyenv with [Pyenv-Installer](https://github.com/pyenv/pyenv-installer), you would need git, curl and bash
```sh
apk add git curl bash
```
```sh
zypper in -t pattern devel_basis
```
* Arch and derivatives
```sh
pacman -S --needed base-devel openssl zlib bzip2 readline sqlite curl \
llvm ncurses xz tk libffi python-pyopenssl git
```
The library ncurses5 would require an [AUR Helper](https://wiki.archlinux.org/index.php/AUR_helpers) to install. If using [YAY](https://aur.archlinux.org/packages/yay/):
The library ncurses5 would require an [AUR Helper](https://wiki.archlinux.org/index.php/AUR_helpers) to install. If using [YAY](https://aur.archlinux.org/packages/yay/):
```sh
yay -S ncurses5-compat-libs
```
```sh
yay -S ncurses5-compat-libs
```
* macOS:
```sh
brew install readline xz
```
**NOTE**: `libssl-dev` is required when compiling Python, installing `libssl-dev` will actually install `zlib1g-dev`, which leads to uninstall and re-install Python versions (installed before installing `libssl-dev`). On Redhat and derivatives the package is named `openssl-devel`.
## Removing a python version
## Removing a python version manually
```sh
rm -rf ~/.pyenv/versions/X.Y.Z
```
Replace X.Y.Z with the version that you want to remove. To list installed versions:
Where "X.Y.Z" is the version that you want to remove. To list installed versions:
```sh
pyenv versions