Last active
December 18, 2016 14:28
-
-
Save TuranTimur/845c9a9ad163b01d5fe7385a121ecd28 to your computer and use it in GitHub Desktop.
suse42 insatll python 2.7, virtualenv, pip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################# | |
# current status check | |
############################################################################# | |
# suse version | |
cat /etc/os-release | |
NAME="openSUSE Leap" | |
VERSION="42.1" | |
VERSION_ID="42.1" | |
PRETTY_NAME="openSUSE Leap 42.1 (x86_64)" | |
ID=opensuse | |
ANSI_COLOR="0;32" | |
CPE_NAME="cpe:/o:opensuse:opensuse:42.1" | |
BUG_REPORT_URL="https://bugs.opensuse.org" | |
HOME_URL="https://opensuse.org/" | |
ID_LIKE="suse" | |
# python version check | |
easy_install --version | |
setuptools 18.3.2 from /usr/lib/python3.4/site-packages (Python 3.4) | |
pip --version | |
pip 7.1.2 from /usr/lib/python3.4/site-packages (python 3.4) | |
############################################################################# | |
# insatll python 2.7 | |
############################################################################# | |
# from http://stackoverflow.com/a/11371726; Package not found: 'bzip2-devel', 'expat-devel', 'tix-devel'. | |
zypper install readline-devel openssl-devel gmp-devel ncurses-devel gdbm-devel zlib-devel libGL-devel tk tix gcc-c++ libX11-devel glibc-devel bzip2 tar tcl-devel tk-devel pkgconfig sqlite-devel autoconf db4-devel libffi-devel valgrind-devel make -y | |
mkdir tmp | |
cd tmp | |
wget http://python.org/ftp/python/2.7.12/Python-2.7.12.tgz | |
tar xvfz Python-2.7.12.tgz | |
cd Python-2.7.12 | |
./configure --prefix=/opt/python2.7 --enable-shared | |
make | |
make altinstall | |
echo "/opt/python2.7/lib" >> /etc/ld.so.conf.d/opt-python2.7.conf | |
ldconfig | |
/opt/python2.7/bin/easy_install-2.7 pip virtualenv | |
/opt/python2.7/bin/virtualenv myproj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment