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
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:
- I installed setup tools: yum install python-setuptools
- I installed a needed module"pandas" easy_install pandas
- I executed my pyton script, which encountered an error that required i use a newer version
- I downloaded and installed Python 3.3.5 to it's own folder so as to not override my default python
- wget http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
- tar xJf ./Python-3.3.5.tar.xz
- cd ./Python-3.3.5
- ./configure --prefix=/opt/python
- make
- make install
- 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