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/dist.py:267: 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.

  • Any reason for the downvote? Nov 6, 2013 at 14:27

1 Answer 1


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.

  • 1
    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, 2015 at 1:45
  • 1
    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, 2015 at 1:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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