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

markdown style issue

Yamashita, Yuu
2016-07-05 01:07:10 +00:00
parent f8ca13af1b
commit 084ab2e466
2 changed files with 66 additions and 45 deletions

@@ -1,42 +1,51 @@
## Requirements:
* Ubuntu/Debian:
```
```sh
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev
```
```
* Fedora/CentOS/RHEL:
```
```sh
yum install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel
```
```
* Mac OS X:
```
brew install readline
```
```sh
brew install readline
```
**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
rm -rf ~/.pyenv/versions/2.7.5
```sh
rm -rf ~/.pyenv/versions/2.7.5
```
## Installing a 32 bit python on 64 bit Mac OS X (this will *not* work on Linux)
CONFIGURE_OPTS="--with-arch=i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" python-build options
```sh
CONFIGURE_OPTS="--with-arch=i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" python-build options
```
## Installing a system-wide Python
If you want to install a Python interpreter that's available to all users and system scripts (no pyenv), use `/usr/local/` as the install path. For example:
sudo python-build 3.3.2 /usr/local/
```sh
sudo python-build 3.3.2 /usr/local/
```
## Make your pythons a little faster
You can set your CFLAGS to accepted safe values to help get a little more speed.
CFLAGS='-O2'
```sh
CFLAGS='-O2'
```
## Build failed - bad interpreter: Permission denied
@@ -44,7 +53,9 @@ If you encounter this error while installing python and your server is a VPS, th
If the answer is no, just set the **$TMPDIR** environment variable to wherever you have a write + execution rights. For example:
export TMPDIR="$HOME/src"
```sh
export TMPDIR="$HOME/src"
```
Please note you'll have to do it every time you'll want to install a new version of python unless you write this command in your `~/.bashrc`.
@@ -52,7 +63,7 @@ Please note you'll have to do it every time you'll want to install a new version
If you've got something like that:
```
```sh
$ pyenv install 2.7.5
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz...
Installing yaml-0.1.4...
@@ -64,7 +75,7 @@ Please, be sure to have "make" installed (```$ sudo apt-get install make```). On
## Build failed: "ERROR: The Python zlib extension was not compiled. Missing the zlib?"
```
```sh
Installing Python-2.7.7...
ERROR: The Python zlib extension was not compiled. Missing the zlib?
@@ -76,31 +87,38 @@ BUILD FAILED
```
* On Mac OS X 10.9 and 10.10 you may need to set the CFLAGS environment variable when installing a new version in order for configure to find the zlib headers (XCode command line tools must be installed first):
```
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 2.7.7
```
```sh
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 2.7.7
```
* Alternatively, try reinstalling XCode command line tools for your OS (especially if you just upgraded your OS)
```
xcode-select --install
```
```sh
xcode-select --install
```
## ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
* If you have homebrew openssl and pyenv installed, you may need to tell the compiler where the openssl package is located:
```
```sh
CFLAGS="-I$(brew --prefix openssl)/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib" \
pyenv install -v 3.4.3
```
or (checked on RHEL6):
```
```sh
CFLAGS=-I/usr/include/openssl \
LDFLAGS=-L/usr/lib64 \
pyenv install -v 3.4.3
```
* Alternatively, if you installed openssl with macports, use the following paths:
```
```sh
CFLAGS="-I/opt/local/include/" \
LDFLAGS="-L/opt/local/lib/" \
pyenv install -v 3.4.3
@@ -114,4 +132,6 @@ To update your python-build definitions:
If you have python-build installed as an pyenv plugin:
$ cd ~/.pyenv/plugins/python-build && git pull
```sh
$ cd ~/.pyenv/plugins/python-build && git pull
```

39
Home.md

@@ -30,43 +30,44 @@ environment.
If you haven't done so, install Xcode Command Line Tools
(`xcode-select --install`) and [Homebrew][]. Then:
```sh
# optional, but recommended:
brew install openssl readline
```
```sh
# optional, but recommended:
brew install openssl readline
```
* **Ubuntu/Debian/Mint:**
```sh
apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev
```
```sh
apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev
```
* **CentOS/Fedora 21 and below:**
```sh
yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel
```
```sh
yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel
```
* **Fedora 22 and above:**
```sh
dnf install -y gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel
```
```sh
dnf install -y gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel
```
* **openSUSE:**
FIXME
```sh
zypper install gcc automake openssl-devel ncurses-devel readline-devel zlib-devel
```
```sh
zypper install gcc automake openssl-devel ncurses-devel readline-devel zlib-devel
```
* **Arch Linux:**
FIXME
```sh
pacman -S base-devel openssl zlib
```
```sh
pacman -S base-devel openssl zlib
```
See also [Common build problems](https://github.com/yyuu/pyenv/wiki/Common-build-problems) for further information.