# ./pip search yaml
You should see something like pyyaml
# ./pip install -upgrade pyyaml
Linux Toolkits Blog is a scratch-pad of tips and findings on Linux
# ./pip search yaml
# ./pip install -upgrade pyyaml
# yum install blas blas-devel lapack lapack-devel numpy
# /usr/local/python-3.4.1/bin/pip install numpy # /usr/local/python-3.4.1/bin/pip install scipy # /usr/local/python-3.4.1/bin/pip install matplotlib # /usr/local/python-3.4.1/bin/pip install ipython[notebook] # /usr/local/python-3.4.1/bin/pip install pandas # /usr/local/python-3.4.1/bin/pip install sympy # /usr/local/python-3.4.1/bin/pip install nose
# yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
# cd /installation_home/Python-3.4.1 # ./configure --prefix=/usr/local/python-3.4.1 # make # make install
#/usr/local/python3/bin/python3
# yum install numpy scipy python-matplotlib ipython python-pandas sympy python-nose
# /usr/local/python-3.4.1/bin/pip3 install networkx
# pip install 'numpy==1.5.1'Pointer 2: To show what files was installed
# pip show --files numpy --- Name: numpy Version: 1.8.1 Location: /usr/local/python-2.7.8/lib/python2.7/site-packages Requires: Files: ../numpy/__init__.py ..... .....Pointer 3: Uninstall a package
# pip uninstall num Uninstalling SomePackage:Pointer 4: Upgrade a package:
# pip install --upgrade SomePackage [...] Found existing installation: SomePackage 1.0 Uninstalling SomePackage: Successfully uninstalled SomePackage Running setup.py install for SomePackage Successfully installed SomePackagePointer 5: List what packages are outdated:
# pip list --outdated SomePackage (Current: 1.0 Latest: 2.0)References:
# yum install gcc44 gcc44-c++ gcc44-gfortranStep 3: Update your alias in your .bashrc
alias gcc='gcc44'Step 4: Configure python 2.7.8
# cd python-2.7.8 # ./configure --prefix=/usr/local/python-2.7.8 # make -j 8 # make installStep 5: Update the PATH and LD_LIBRARY_PATH in your .bashrc
export PATH=$PATH:/usr/local/python-2.7.8/bin......... export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/python-2.7.8/libStep 6: Download get-pip.py For more information see pip installation site Create a directory inside python2.7 directory and put pip in that directory
# mkdir /usr/local/python-2.7.8/pip # wget https://bootstrap.pypa.io/get-pip.py .Step 7: Install pip with Administrator rights
# python2.7 get-pip.pyIf setuptools (or distribute) is not already installed, get-pip.py will install setuptools for you. To upgrade an existing setuptools (or distribute), run
# pip install -U setuptools # pip install numpy
# python2.7 setup.py install /usr/bin/ld: /usr/lib64/libxml2.a(entities.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libxml2.a: could not read symbols: Bad value
# mv /usr/lib64/libxml2.a /usr/lib64/libxml2.a.org
# python2.7 setup.py install /usr/bin/ld: /usr/lib64/libm.a(entities.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
# mv /usr/lib64/libm.a /usr/lib64/libm.a.org
# yum install python-devel numpy python-matplotlib
# tar -zxvf HTSeq-0.5.4p5.tar.gz # cd HTSeq-0.5.4p5
# python setup.py build # python setup.py install
$ /usr/local/alps2.0.2/bin/alpspython
$ import pyalps
Traceback (most recent call last): File "", line 1, in ? File "/usr/local/alps-2.0.2/lib/pyalps/__init__.py", line 37, in ? from dataset import * File "/usr/local/alps-2.0.2/lib/pyalps/dataset.py", line 29, in ? import numpy as np ImportError: No module named numpy
# yum install python-numpyThe respective libraries will be installed
Could not find platform independent librariesCould not find platform dependent libraries Consider setting $PYTHONHOME to [: ] ImportError: No module named site
# ./configure # make # make install
# ./cplex_studio122.acad.linux-x86.bin
# mkdir -p /usr/ilog/ilm # mv access.ilm /usr/ilog/ilm
# /usr/local/cplex_studio_122/cplex/bin/x86-64_sles10.4.1/cplex
# cd /usr/local/cplex_studio_122/cplex/python/x86-64_sles10_4.1/ # python setup.py install --home ./cplex/
export PYTHONPATH=$PYTHONPATH:/usr/local/cplex_studio_v12/cplex/python/x86-64_sles10_4.1
# vim /etc/httpd/conf/httpd.conf
LoadModule python_module modules/mod_python.so
# service restart httpd
<Directory /home/www/html> AddHandler mod_python .py PythonHandler mod_python.publisher PythonDebug On </Directory>
from mod_python import apache
def handler(req):
req.content_type = 'text/plain'
req.send_http_header()
req.write("Hello World!")
return apache.OK# service restart httpd