0

I found the answers from Building Python and more on missing modules.

Also the problem I meet is that. But something I didn't understand eg to how to install these modules.

    Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _tkinter           bsddb185        
dbm                gdbm               sunaudiodev     
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

I can install these, but I have something can't understand, the older python which Ubuntu take,Is there something the new Python can't find, or something else.If I end the install ,How to make the system to use the version I installed?

sudo ln -s /usr/local/python /usr/bin/python 

On my pc,It didn't work.So where my fault? If I install another version of Python, which version to choose before I use? And is there problem about using else soft?

Community
  • 1
  • 1
sgsheg
  • 154
  • 1
  • 11
  • Unless you *have* to build TKInter GUI code, I would not worry about this *at all*. – Martijn Pieters Jul 08 '13 at 16:19
  • The rest of the list of modules are things your platform doesn't support or are obsolete and have been deprecated. – Martijn Pieters Jul 08 '13 at 16:19
  • Can I use sudo apt-get install python-tk?But the else represent what? – sgsheg Jul 08 '13 at 16:22
  • `python-tk` is built to go with the `python` package for your Debian or Ubuntu installation, *not* for your own Python build. Install `tk-dev` instead. – Martijn Pieters Jul 08 '13 at 16:25
  • The others are `dbm` variations. You are not likely to ever need those. See `http://docs.python.org/2/library/anydbm.html` for an overview of what Python supports. `sunaudiodev` is for SUN-system audio devices. You don't have one. – Martijn Pieters Jul 08 '13 at 16:27
  • I make is successfully,and I have another question.If I want to use Python3.3, I ln -s /usr/local/python3/python /usr/bin/python, It can work or not? – sgsheg Jul 08 '13 at 16:37
  • That can break other Python scripts that expect Python 2. I'd not link this into `/usr/bin` *at all*; use `/usr/local/bin` instead. – Martijn Pieters Jul 08 '13 at 16:39
  • I knew.Now I use a soft,but It it reply me that { ImportError: No module named dbus },what is dbus? I use the command { ImportError: No module named dbus },but when I retry ,it also there. – sgsheg Jul 08 '13 at 16:44
  • `dbus` is an external library to integrate with the Gnome dbus system. It does not come with Python itselsf. – Martijn Pieters Jul 08 '13 at 16:45

1 Answers1

1

You don't need to worry about most of those modules.

The tkinter module requires Tcl/Tk with headers, on a Debian-based system installing tk-dev is enough to satisfy the requirements.

The sunaudiodev module requires you to have a Sun audio device. You don't have one, trust me.

The db modules are legacy modules. You could install libdb4.8-dev to get some of these to compile, but I would not worry about these. The anydbm module will switch between available modules as needed, but almost all modern code has long since abandoned using DBM-like storage in favor of sqlite3.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343