CentOS (rel6) with default python 2.6, but seperate 3.3.5 installation

Posted by Silvertiger on Server Fault See other posts from Server Fault or by Silvertiger
Published on 2014-06-06T14:03:12Z Indexed on 2014/06/06 15:28 UTC
Read the original article Hit count: 319

Filed under:
|
|

I have a CentOS server (rel6) that had python installed (2.6), but I needed a few features in 3.3+. I installed 3.3 into a seperate folder and made a symbolic link to execute it:

  1. I installed setup tools: yum install python-setuptools
  2. I installed a needed module"pandas" easy_install pandas
  3. I executed my pyton script, which encountered an error that required i use a newer version
  4. I downloaded and installed Python 3.3.5 to it's own folder so as to not override my default python
  5. Made s symbolic link to allow me to execute this new python:
    • ln -s /opt/python3.3/bin/python3.3 ~/bin/py

The problem is that when I execute the python script with my new py alias, it does not have all the addons needed (explicitly MySQLdb) which the default install does.

How do i go about installing the MySQLdb module, or any for that matter, to be reachable or useable for the new Python 3.3.5 installation? Or is there a way to make the current modules in 2.6 available to 3.3.5 as well?

© Server Fault or respective owner

Related posts about centos

Related posts about mysql