views:

451

answers:

5

I tried to install a Python module by typing: sudo python setup.py install After I typed this command I got a lot of output to the screen. The lest few lines are bellow:

writing manifest file 'scikits.audiolab.egg-info/SOURCES.txt'
removing '/usr/lib/python2.5/site-packages/scikits.audiolab-0.10.2-py2.5.egg-info' (and everything under it)
Copying scikits.audiolab.egg-info to /usr/lib/python2.5/site-packages/scikits.audiolab-0.10.2-py2.5.egg-info
Installing /usr/lib/python2.5/site-packages/scikits.audiolab-0.10.2-py2.5-nspkg.pth
running install_scripts

So, there were nothing suspicious. But when I tried to use the module from the Python:

import pyaudiolab

I see that Python does not find the module:

Traceback (most recent call last):  
File "test.py", line 1, in <module>
    import pyaudiolab ImportError: No module named pyaudiolab

How can I found out what went wrong? As a result of the installation I get a new directory: /usr/lib/python2.5/site-packages (so something happened) but I still cannot use the module. Can anybody help me with that?

+3  A: 

Have you tried import scikits.audiolab or import audiolab?

ezod
I just tried what you have suggested. "audiolab" instead "pyaudiolab" does not change anything. When I try import scikits.audiolab I get: File "/usr/lib/python2.5/site-packages/scikits/audiolab/__init__.py", line 38, in <module> from numpy.testing import Tester
Roman
it seems you have dependency on a module named Tester which you dont have (regarding the reproted problem it seems like it is solved)
liza
A: 
  • check if you have the module somewhere inside: /usr/lib/python2.5/site-packages/ (search for a file named |modulename|.py so in your example - try: pyaudiolab.py or audiolab.py)

  • if it exists - check if the directory in which it exists is found in the sys.path variable:

    import sys

    sys.path

liza
I do not have *audiolab.py in /usr/lib/python2.5/site-packages/. But I have there a directory called scikits.audiolab-0.10.2-py2.5.egg-info. But this subdirectory also does not contain *audiolab.py file.
Roman
try importing the following:from numpy.testing import Testerthis seems to be your current problem
liza
+1  A: 

From the OP's comment to an answer, it's clear that scikits.audiolab is indeed where this module's been installed, but it also needs you to install numpy. Assuming the module's configuration files are correct, by using easy_install instead of the usual python setup.py run, you might have automatically gotten and installed such extra dependencies -- that's one of the main points of easy_install after all. But you can also do it "manually" (for better control of where you get dependencies from and exactly how you install them), of course -- however, in that case, you do need to check and manually install the dependencies, too.

Alex Martelli
I have installed numpy before. And it works fine (if I type "from numpy import *", Python does not complain.
Roman
@Roman, so can you `import numpy.testing`? What about `from numpy.testing import Tester`? Looks like you have an older (what version?) or partially-installed `numpy` that doesn't supply the `testing` sub-module or its `Tester`, and scikits.audiolab requires that.
Alex Martelli
I can "import numpy.testing" but I cannot "from numpy.testing import Tester". Version of numpy is '1.1.1'.
Roman
When I type "sudo apt-get install python-numpy" I get the following message "python-numpy is already the newest version". But as far as I know 1.1.1. is not the latest version of the numpy. How it comes?
Roman
1.1.1 is not the latest upstream numpy, but it may be the latest supported by your version of Ubuntu (or Debian or whatever other Linux distro you have).
Alex Martelli
+1  A: 

Your library depends upon numoy. Try installing numpy:

sudo apt-get install python-numpy
sharjeel
When I type what suggested, the system says me that I have already the newest version of numpy. And Python says that my version of numpy is 1.1.1. which, as far as I know, is NOT the latest version. I think it is an old version which does not contain "Tester" that I need.
Roman
Try sudo easy_install numpy
sharjeel
+1  A: 

You need a more recent version of numpy (>= 1.2.0), as indicated on the audiolab installation informations.

David Cournapeau