mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-15 14:53:53 -05:00
cleanup info duplicating Home#suggested-build-enviornment
@@ -1,83 +1,54 @@
|
|||||||
# Prerequisites
|
# 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:
|
* Ubuntu/Debian:
|
||||||
|
|
||||||
```sh
|
* Alternative of libreadline-dev:
|
||||||
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
|
|
||||||
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
|
```sh
|
||||||
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
|
sudo apt install libedit-dev
|
||||||
```
|
```
|
||||||
Alternative of libreadline-dev:
|
|
||||||
```sh
|
* An [inferior alternative](https://github.com/docker-library/python/issues/235) for `libncursesw` if it's not available:
|
||||||
sudo apt install libedit-dev
|
|
||||||
```
|
```sh
|
||||||
|
sudo apt install libncurses5-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
* Fedora/CentOS/RHEL(aws ec2):
|
* Fedora/CentOS/RHEL(aws ec2):
|
||||||
|
|
||||||
```sh
|
* Alternative of openssl-devel:
|
||||||
sudo yum install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite \
|
|
||||||
sqlite-devel openssl-devel xz xz-devel libffi-devel findutils
|
```sh
|
||||||
```
|
sudo yum install compat-openssl10-devel --allowerasing
|
||||||
Alternative of openssl-devel:
|
```
|
||||||
```sh
|
|
||||||
sudo yum install compat-openssl10-devel --allowerasing
|
|
||||||
```
|
|
||||||
|
|
||||||
* openSUSE
|
* openSUSE
|
||||||
|
|
||||||
```sh
|
For building Python versions from source with OpenSUSE you need the packages in pattern `devel_basis`
|
||||||
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`
|
```sh
|
||||||
|
zypper in -t 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
|
|
||||||
```
|
|
||||||
|
|
||||||
* Arch and derivatives
|
* Arch and derivatives
|
||||||
|
|
||||||
```sh
|
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/):
|
||||||
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/):
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yay -S ncurses5-compat-libs
|
yay -S ncurses5-compat-libs
|
||||||
```
|
```
|
||||||
|
|
||||||
* macOS:
|
## Removing a python version manually
|
||||||
|
|
||||||
```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
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
rm -rf ~/.pyenv/versions/X.Y.Z
|
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
|
```sh
|
||||||
pyenv versions
|
pyenv versions
|
||||||
|
|||||||
Reference in New Issue
Block a user