Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to install Nose ( into a subdirectory of my home directory on a Linux machine? (I'm not on the sudoers list for that machine.) If so, how do I do that?

share|improve this question
up vote 2 down vote accepted

The answer is to use virtualenv.

But I didn't mention that (because I'm not on the sudoers list), I also did a custom Python install. When I installed correctly following Crast's instructions in, I was able to install nose using that version of Python.

Update: I didn't notice until now that when I actually run nosetests, I get:

$ nosetests
bash: /home/dspitzer/apps/bin/nosetests: /usr/local/bin/python2.6: bad interpreter: No such file or directory

I'll try reinstalling with the --root option as suggested in the other answer.

share|improve this answer
I suggest you to try running a trivial python script that does nothing and see what happens. I strongly suspect that you have a broken python install. – Anonymous Feb 20 '10 at 21:05

Also most scripts support a custom root directory setting. So you can use them like:

python install --root <a subdirectory of your home directory>

Having that subdirectory in PYTHONPATH, you shall be able to get access to modules that you installed there.

share|improve this answer
I ran python install --root ~/apps/nose-0.11.1/ and it seemed to install correctly. I found nosetests in ~/apps/nose-0.11.1/home/dspitzer/apps/bin/, but when I run it I get the same error: "bash: ./nosetests: /usr/local/bin/python2.6: bad interpreter: No such file or directory" – Daryl Spitzer Feb 19 '10 at 19:21
With such --root the nosetests script shall get installed into ~/apps/nose-0.11.1/bin, the nose python package - into ~/apps/nose-0.11.1/lib/python2.6/site-packages. Running it from there gives an error. This is obvious - no nose in /usr/lib/python2.6/site-packages. Running it like "PYTHONPATH=~/apps/nose-0.11.1/usr/lib/python2.6/site-packages/ ./nosetests" when being in ~/apps/nose-0.11.1/bin makes it work as expected. Before doing this I've removed the nose package from my system (Slackware Linux 13.0) so it wouldn't interfere into my experiment. – Anonymous Feb 20 '10 at 16:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.