top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to install automatically missing modules on a debian-system?

+3 votes
389 views

When I start a python-script I get messages like "module_x is missing". I then perform an apt-cache search module_x, followed by an apt-get install name_of_missing_module.deb

I was wondering whether someone here has a kind of method which automatically looks for the missing modules as debian-packages and offers to install them?

posted Feb 19, 2014 by Abhay Kulkarni

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

On building Python 2.7.5 I got the following message:

Python build finished, but the necessary bits to build these modules were not found:
dl imageop linuxaudiodev 
spwd sunaudiodev 
To find the necessary bits, look in setup.py in detect_modules()  for the module's name.

It carried on with the installation OK, but I don't understand the last sentence in the message. How can I find out exactly what modules are missing, and what I need to do to make sure they are built next time?

+1 vote

I want to install path.py in my Python 3.4 environment on a Centos 5 box. My /usr/local/bin/ contains:

easy_install-3.4 
python3.4  
etc. 

We are behind a proxy server and I tried this:

# /usr/local/bin/easy_install-3.4 path.py 

Searching for path.py 
Reading https://pypi.python.org/simple/path.py/ 
Download error on https://pypi.python.org/simple/path.py/: hostname '172.29.68.1  
' doesn't match either of 'www.python.org', 'python.org', 'pypi.python.org',  
'docs.python.org', 'testpypi.python.org', 'bugs.python.org', 'wiki.python.org',  
'hg.python.org', 'mail.python.org', 'packaging.python.org', 'pythonhosted.org',  
'www.pythonhosted.org', 'test.pythonhosted.org', 'us.pycon.org', 'id.python.org' --  
Some packages may not be found! 

Couldn't find index page for 'path.py' (maybe misspelled?), Am I best to use pip or easy_install? also if easy_install, how can I fix the above error?

+1 vote

I just upgraded my Mac Mini to Yosemite and have never dabbled in Python on this OS. I see it has Python 2.7.6 installed.

When I do something like

from PIL import ImageFont, ImageDraw

it tells me that it cannot find PIL, How do I install this on Yosemite?

Any suggestions?

+4 votes

I have been trying to set up a python, django, mysql, virtualenvwrapper and git development project and am really confused. All of the documentation seems to ignore the apt-get installation methods used by Debian Linux and its derivatives. Does pip install the same as apt-get; I don't think so. If I use virtualenvwrapper, how does this fit with the normal debian (wheezy) installation. I also need git which just confuses the situation even more. Must I give up the automatic updating system that Debian provides when setting up the development environment?

The documentation centers on Windows, Mac and generic Linux distributions and ignores the automation of the Debian installation. All of the documentation I have found concentrates on the installation of individual packages or on the use of python-django and is very sketchy on the overall virtualenv(wrapper), git, python-django file structure and installation order.

+2 votes

Iam on python 2.7 and linux .I need to know if we need to place the modules in a particular or it doesn't matter at all while writing the program.

For Example

import os
import shlex
import subprocess
import time
import sys
import logging
import plaftform.cluster
from util import run

def main():
 """ ---MAIN--- """

if __name__ == '__main__':
 main()

In the above example :

I am guessing may be the python modules like os , shlex etc come first and later the user defined modules like import plaftform.cluster etc

Sorry if my question sounds dump , I was running pep8 and don't see its bothered much about it

...