Title: test_venv.TestEnsurePip fails mysteriously when /tmp is too small
Type: behavior Stage:
Components: Versions:
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, r.david.murray, xtreak
Priority: normal Keywords:

Created on 2016-07-16 02:09 by r.david.murray, last changed 2018-09-25 14:54 by xtreak.

Messages (1)
msg270532 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-07-16 02:09
I've been having a failure in test_venv when running the tests suite for some months now.  Since the buildbots aren't, I was guessing it was a local problem.  I finally got around to looking at it today, and I had no clue what was wrong here, after setting maxDiff to None:

FAIL: test_with_pip (test.test_venv.EnsurePipTest)
Traceback (most recent call last):
  File "/home/rdmurray/python/p35/Lib/test/", line 381, in test_with_pip
    self.assertEqual(err, "")
AssertionError: 'Traceback (most recent call last):\n  Fil[741 chars]\'\n' != ''
- Traceback (most recent call last):
-   File "/home/rdmurray/python/p35/Lib/", line 174, in _run_module_as_main
-     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
-   File "/home/rdmurray/python/p35/Lib/", line 133, in _get_module_details
-     return _get_module_details(pkg_main_name, error)
-   File "/home/rdmurray/python/p35/Lib/", line 109, in _get_module_details
-     __import__(pkg_name)
-   File "/tmp/tmpcpx0dj2o/lib/python3.5/site-packages/pip/", line 14, in <module>
-     from pip.utils import get_installed_distributions, get_prog
-   File "/tmp/tmpcpx0dj2o/lib/python3.5/site-packages/pip/utils/", line 27, in <module>
-     from pip._vendor import pkg_resources
- ImportError: cannot import name 'pkg_resources'

It turns out that the problem was that the virtual machine I was running this in had a /tmp that was too small for pip to operate.  I've had this problem often with pip on my VMs.

I'm reporting this because it seems to me reasonably likely that ensurepip will fail mysteriously if /tmp is too small.  I'm OK with this issue getting closed as won't fix, since my setup is rather odd and it may be that no one else will run in to this.  But it may be that someone else will, and at least there will be a bug report to find.
Date User Action Args
2018-09-25 14:54:10xtreaksetnosy: + xtreak
2016-07-16 02:09:05r.david.murraycreate