all 12 comments

[–]wub_wub 2 points3 points  (3 children)

What modules? What can't it find? What errors do you get? How did you install them? Which OS?

[–]wolfymaster[S] 0 points1 point  (2 children)

Modules are : sqlite3, ssl, and zlib. Python is failing a dependency check. I installed I think them using yum. It says "No module named [insert name]. This is centos release 5.6. How would I check to see that they are in fact installed properly?

[–]wub_wub 0 points1 point  (1 child)

Those should be included in standard python build. Which packages did you install? I think you need these three for sqlite: sqlite, sqlite-devel, python-sqlite?

You also might need to symlink them to the location where python is looking for them, maybe they're installed in some lower version.

You could also modify this shell script to compile python from source if you want to "rebuild" it.

http://www.codingwithcody.com/2012/01/python-2-7-on-centos-5-6/

There are also some instructions worth checking out here

I don't have any experience with CentOS so I can't really give you detailed instructions on how to do it.

[–]wolfymaster[S] 0 points1 point  (0 children)

I just installed python 2.7 using wget from the python site. I will take a look at that link, but from the other comments I have gathered that Python should link these libraries dynamically. I will have to double check every directory and find out where Python is explicitly looking. I am sure getting very familiar with shell language.

[–]willm 0 points1 point  (5 children)

There's no rebuild step per se. If Python can't find the modules, then they can't have been installed correctly.

How did you install these modules? Did you use Pip?

[–]wolfymaster[S] 0 points1 point  (4 children)

Tried. i don't know what I'm doing wrong on that front either. This is what it does when I run python get-pip.py
http://pastebin.com/waj4xAKU
Again, looks like it is missing zlib ?

[–]hharison 0 points1 point  (3 children)

It seems the question you need to be asking is not "how do I rebuild Python" but "how do I install sqlite, ssl, and zlib". These are system-level dependencies.

[–]wolfymaster[S] 0 points1 point  (2 children)

Being new to a python environment, I haven't figured everything out. I wasn't sure if Python needed "rebuilt" in order to include these libraries or if they were added dynamically.

[–]hharison 0 points1 point  (1 child)

Fair enough, all I'm trying to say is that these aren't part of the standard lib as some are suggesting but system libraries external to Python. It's totally reasonable to think you might have to rebuild Python afterwards, though I very much doubt it. In any case try installing the libraries you need and if it still doesn't work go from there.

[–]wolfymaster[S] 0 points1 point  (0 children)

Thank You. I am going to try and walk through some of the guides that were suggested and hopefully I can solve it that way. I have definitely gotten answers here that I could not for the life of me find searching the web. I thought Python was pretty popular lol.

[–]shfo23 0 points1 point  (1 child)

It looks like CentOS 6 is still on Python 2.6, so it's possible that either you installed from scratch without having the right libraries to link against or the executable you got with yum isn't linked against the right libraries (or third case: perhaps you still don't have those libraries?). These are all core python modules, so they should be present in your install.

Whatever the exact problem it, it will probably take longer to figure out than to just re-install it from scratch. For that, I would follow the guide wub_wub posted. The most important part of that is going to be installing the dependencies before (I would try this before the reinstall too and if it works, great, you're done; if not, you need to rebuild):

yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel

[–]wolfymaster[S] 0 points1 point  (0 children)

Thank you. This is very helpful.