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

I am trying to install the python pandas package in a virtualenv using pip.

On my development machine it installed correctly, but now I am trying on the server, it gets so far then it seems to get stuck:

/apps/PYTHON/2.7.3/lib/python2.7/distutils/ UserWarning: Unknown distribution option: 'define_macros'
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/lib': 'benchmarks'
Could not locate executable gfortran
Could not locate executable f95
Found executable /apps/modules/wrappers/fortran/ifort

Top shows ifort running at 46% cpu.

Is there any way I can tell if this is working correctly (can I check files it is updating for example), or if it is stuck in a loop?

It has been running for 40 minutes so far.

share|improve this question
Any reason for the downvote? – wobbily_col Nov 6 '13 at 14:27
up vote 7 down vote accepted

Get the pid (pidof process or top or ps, etc) of the process and use strace -p <pid>. If you see it polling or continuously calling the same syscalls over and over again its probably stuck in an infinite loop. To determine if its stuck in an infinite loop you have to use the time features of strace (although this is just an assumption).

If you just do a plain old strace -p <pid> you'll really only see the syscalls but not the data being passed between them; to see this data also specify the -s parameter. If the process forks itself you wont see any of its children in the strace, so be sure to specify -f to see what syscalls the children are doing.

You may also want to see how long it's taking between syscalls; to do this you can use -tt and -r and -T. If there is polling, it can be completely normal if its waiting on a file to be created.

share|improve this answer
Was able to find a bug in pip with this... apparently pip does NOT truly avoid writing to ~/.cache/pip even when you pass --no-cache-dir! When run inside a docker container with HOME as a bind mount: pip list --no-cache-dir <-- Hangs.... and strace -p $(pidof pip) returns: link("/Users/myuser/.cache/pip/6a7276a29c5c-d1762740.3742-1226672488388915023", "/Users/myuser/.cache/pip/selfcheck.json.lock") = -1 EPERM (Operation not permitted) – TrinitronX Dec 3 '15 at 1:45
Tested on CentOS 7 with pip 7.1.0. Upgrading pip to 7.1.2 seems to behave differently in that it will output a list of packages first before hanging.... but it still hangs with similar messages in strace: sudo strace -p $(pidof 'python') link("/Users/foobar/.cache/pip/6a7276a29c5c-f3b58740.5415-1226672488388915023", "/Users/foobar/.cache/pip/selfcheck.json.lock") = -1 EPERM (Operation not permitted) – TrinitronX Dec 3 '15 at 1:55

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.