Thursday, November 26, 2015

Some Python packages


yum install python27

---- install numpy
yum install python27-pip python27-devel parallel
cd /usr/bin
ln -s pip2.7 pip
pip install --upgrade pip
pip install requests solrpy
yum install gcc
pip install numpy

---- numpy, scipy on ubuntu
yum install python-pip python-dev build-essential
yum install libatlas-base-dev gfortran
pip install numpy scipy

---- scipy on centOS
yum install lapack-devel
pip install scipy

---- Install pip
yum install python-pip
if you have an error like: "urllib3/util/ssl_.py:90: InsecurePlatformWarning" do:
sudo yum remove python-openssl

---- look for a package:
pip search requests |grep requests
---- see if it is installed
pip show requests
---- see all installed
pip freeze

---- MySQL
pip install MySQL-python       didn't work right away. I had to do this

yum search all MySQL
yum install MySQL-client
yum install MySQL-devel
yum install MySQL-python27

---- image module, PIL
pip install PIL --allow-external PIL --allow-unverified PIL

---- image hash
pip install ImageHash

--- look for local Python package
pip list |grep cv

--- Solr sunburnt (Python Solr interface)
You may have errors with the default lib. What you need to do:
sudo pip uninstall sunburnt
git clone http://github.com/tow/sunburnt.git
cd sunburnt

sudo python setup.py install

--- SolrPy
usually better than sunburnt

--- virtualenv gives a urllib3 error
virtualenv my-virtualenv -p /usr/bin/python

my-virtualenv$ source bin/activate
(my-virtualenv) lee@mycomp:~/python/flask/my-virtualenv$ deactivate
.
.

No comments: