Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    2

    Default Python Modules And easy_install

    Here is a quick guide to installing easy_install to assist with the installation of Python modules.

    The modules that can be installed with this feature are listed here, http://pypi.python.org/simple/

    First of all you will need to install the lastest version of Python from the Site Manager as well as the Gnu Compiler Collection or GCC. Once those are installed you will be ready to install Python modules.

    From an SSH terminal run the following command,

    Code:
    wget http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg#md5=fe67c3e5a17b12c0e7c541b7ea43a8e6
    Once that has downloaded execute the following,

    Code:
    sh setuptools-0.6c9-py2.5.egg
    This will install easy_install to the following location, /usr/local/python-2.5/bin/easy_install

    You will most likely want to copy the command into your /usr/bin/ folder so you can utilize this command from any directory without having to use the full path. This can be done with the following command,

    Code:
    cp /usr/local/python-2.5/bin/easy_install /usr/sbin/
    Now you can use the easy_install command to install a number of different modules. In this example I am using easy_install to install MySQL-python.

    Code:
    easy_install MySQL-python
    And it is as easy as that. MySQL-python is now installed and ready to use.
    Last edited by Skylude; 09-19-2009 at 03:30 AM.

  2. #2
    Junior Member
    Join Date
    Jul 2009
    Posts
    4

    Default

    I'm running into a problem trying to import mysqldb ... its spitting out: ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient_r.so.15: cannot open shared object file: No such file or directory

    This post (http://www.gossamer-threads.com/lists/zope/db/211113) suggests a solution but I haven't figured out how to make it work yet.

    Otherwise, it seems an excellent solution.

  3. #3
    Junior Member
    Join Date
    Jul 2009
    Posts
    4

    Default Follow up

    There is a libmysqlclient_r.so.15.0.0 in /usr/local/mysql/lib/mysql/ but I'm unable to create a symbolic link (permission denied) and I get the following error when I try ldconfig (solution from http://markmail.org/message/vjc76ecx...tate:results):
    ldconfig: Can't link /usr/local/mysql/lib/mysql/libmysqlclient.so.15 to libmysqlclient.so.15.0.0

    Seems there must be a simple solution to this somewhere ....

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    The post you linked to suggested this;
    To permanently add /usr/local/lib/mysql to ld search directory path, add it to /etc/ld.so.conf file (it is just plain text file - add yet another line to the end of the file) and run ldconfig without parameters to rebuild ld.so.cache.
    Did you try that or did you try creating a symbolic link. The above should work suggestion should have worked.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5
    Junior Member
    Join Date
    Jul 2009
    Posts
    4

    Default

    ldconfig doesn't want to link the files.
    I downloaded an rpm of mysql and extracted the libmysqlclient_r.so.15, which appears to be a link to libmysqlclient_r.so.15.0.0. With this file in place I produced a new error message: file too short.
    Renaming the 15.0.0 file to 15 seems to solve that problem (though it strikes me as a hack) but produces a new error message:
    ImportError: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by .../.python-eggs/MySQL_python/.../_mysql.so).

    I feel like I've gone down a rabbit hole....

  6. #6
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    You can't use rpm's on the WestHost system. That could be the root of your problem.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  7. #7
    Junior Member
    Join Date
    Jul 2009
    Posts
    4

    Default

    Hmm. Perhaps I'll undo what I've got and try again.

    I was reading up on the migration to 4.0 yesterday ... will all this break in the fall anyway?

  8. #8
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,720

    Default

    Quote Originally Posted by snowers View Post
    I was reading up on the migration to 4.0 yesterday ... will all this break in the fall anyway?
    Yep! If you really need this you might want to look at migrating to vps.net. Now it could be that WH 4.0 would have something built into it that would suite your needs but it is a shared hosting environment so modifications like this would not "stick'.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •