'ImportError: No module named pkg_resources' errors from runner tests under Windows 7 -64 Bit #1272

Closed
opened 2010-11-27 23:29:17 +00:00 by pgrunwald · 9 comments
pgrunwald commented 2010-11-27 23:29:17 +00:00
Owner

Windows 7 Ultimate 64-Bit
Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)] on win32

(snip SKIPPED and TODO tests)
=============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_path

Traceback (most recent call last):

    File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line

90, in _cb

    self.failUnlessEqual(rc_or_sig, 0, str(res))

twisted.trial.unittest.FailTest?: (, 'Traceback (most recent call last):\r\n F ile "g:
allmydata-tahoe-1.8.0-r4803
support
Scripts
tahoe.pyscript", line 6,

    in <module>\r\n from pkg_resources import load_entry_point\r\nImportError: N

o module named pkg_resources\r\n', 1) not equal: a = 1 b = 0

=============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_run_with_python_options

Traceback (most recent call last):

    File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line

149, in _cb

    self.failUnlessEqual(rc_or_sig, 0, str(res))

twisted.trial.unittest.FailTest?: (, 'Traceback (most recent call last):\r\n F ile "g:
allmydata-tahoe-1.8.0-r4803
support
Scripts
tahoe.pyscript", line 6,

    in <module>\r\n from pkg_resources import load_entry_point\r\nImportError: N

o module named pkg_resources\r\n', 1) not equal: a = 1 b = 0

=============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_unicode_arguments_and_output

Traceback (most recent call last):

    File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line

137, in _cb

    self.failUnlessIn("Unknown command: "+tricky_out, out)

twisted.trial.unittest.FailTest?: 'Unknown command: \xe2\x98\xa1' not in =============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_version_no_noise

Traceback (most recent call last):

    File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line

165, in _cb

    self.failUnlessEqual(rc_or_sig, 0, str(res))

twisted.trial.unittest.FailTest?: (, 'Traceback (most recent call last):\r\n F ile "g:
allmydata-tahoe-1.8.0-r4803
support
Scripts
tahoe.pyscript", line 6,

    in <module>\r\n from pkg_resources import load_entry_point\r\nImportError: N

o module named pkg_resources\r\n', 1) not equal: a = 1 b = 0

Ran 828 tests in 809.711s

FAILED (skips=15, expectedFailures=3, failures=4, successes=806) ```
Windows 7 Ultimate 64-Bit `Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)] on win32` ``` (snip SKIPPED and TODO tests) =============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_path Traceback (most recent call last): File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line 90, in _cb self.failUnlessEqual(rc_or_sig, 0, str(res)) twisted.trial.unittest.FailTest?: (, 'Traceback (most recent call last):\r\n F ile "g: allmydata-tahoe-1.8.0-r4803 support Scripts tahoe.pyscript", line 6, in <module>\r\n from pkg_resources import load_entry_point\r\nImportError: N o module named pkg_resources\r\n', 1) not equal: a = 1 b = 0 =============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_run_with_python_options Traceback (most recent call last): File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line 149, in _cb self.failUnlessEqual(rc_or_sig, 0, str(res)) twisted.trial.unittest.FailTest?: (, 'Traceback (most recent call last):\r\n F ile "g: allmydata-tahoe-1.8.0-r4803 support Scripts tahoe.pyscript", line 6, in <module>\r\n from pkg_resources import load_entry_point\r\nImportError: N o module named pkg_resources\r\n', 1) not equal: a = 1 b = 0 =============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_unicode_arguments_and_output Traceback (most recent call last): File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line 137, in _cb self.failUnlessIn("Unknown command: "+tricky_out, out) twisted.trial.unittest.FailTest?: 'Unknown command: \xe2\x98\xa1' not in =============================================================================== [FAIL]: allmydata.test.test_runner.BinTahoe?.test_version_no_noise Traceback (most recent call last): File "g:\allmydata-tahoe-1.8.0-r4803\src\allmydata\test\test_runner.py", line 165, in _cb self.failUnlessEqual(rc_or_sig, 0, str(res)) twisted.trial.unittest.FailTest?: (, 'Traceback (most recent call last):\r\n F ile "g: allmydata-tahoe-1.8.0-r4803 support Scripts tahoe.pyscript", line 6, in <module>\r\n from pkg_resources import load_entry_point\r\nImportError: N o module named pkg_resources\r\n', 1) not equal: a = 1 b = 0 Ran 828 tests in 809.711s FAILED (skips=15, expectedFailures=3, failures=4, successes=806) ```
tahoe-lafs added the
unknown
major
defect
1.8.0
labels 2010-11-27 23:29:17 +00:00
tahoe-lafs added this to the 1.8.1 milestone 2010-11-27 23:29:17 +00:00
tahoe-lafs modified the milestone from 1.8.1 to undecided 2010-11-28 01:36:48 +00:00
davidsarah commented 2010-11-28 01:40:01 +00:00
Author
Owner

This looks like setuptools is not installed, or not being found. But why wasn't the bundled zetuptoolz used in that case?

This looks like setuptools is not installed, or not being found. But why wasn't the bundled zetuptoolz used in that case?
tahoe-lafs added
packaging
and removed
unknown
labels 2010-11-28 01:40:01 +00:00
davidsarah commented 2010-11-28 02:49:30 +00:00
Author
Owner

Replying to davidsarah:

This looks like setuptools is not installed, or not being found. But why wasn't the bundled zetuptoolz used in that case?

What should happen is that setuptools-0.6c16dev2.egg is copied to support\lib\site-packages by python setup.py build, and then that site-packages directory gets added to the PYTHONPATH variable by [the bin\tahoe script]source:bin/tahoe-script.template. Then the easy-install.pth file in that directory should have a line saying "setuptools-0.6c16dev2.egg", which causes the site module to add that egg to sys.path during the default Python initialization.

I don't think this is supposed to rely on the hack that setuptools installs to site.py. That hack should only change the order of sys.path entries, so the lack of it wouldn't explain pkg_resources not being found at all.

pgrunwald: please list the contents of your <tahoe dir>\support\lib\site-packages directory, as well as the easy-install.pth and setuptools.pth files in that directory.

Also, with the Tahoe distribution as the current directory, what does this give:

set PYTHONPATH=
python -c "import pkg_resources; print pkg_resources.require('setuptools')"

and this:

set PYTHONPATH=support\lib\site-packages
python -c "import pkg_resources; print pkg_resources.require('setuptools')"

and this:

set PYTHONPATH=support\lib\site-packages;support\lib\site-packages\setuptools-0.6c16dev2.egg
python -c "import pkg_resources; print pkg_resources.require('setuptools')"

?

(Please do not install setuptools yet. We'd like to get this working without you having to do that.)

Replying to [davidsarah](/tahoe-lafs/trac-2024-07-25/issues/1272#issuecomment-123011): > This looks like setuptools is not installed, or not being found. But why wasn't the bundled zetuptoolz used in that case? What should happen is that `setuptools-0.6c16dev2.egg` is copied to `support\lib\site-packages` by `python setup.py build`, and then that `site-packages` directory gets added to the PYTHONPATH variable by [the bin\tahoe script]source:bin/tahoe-script.template. Then the `easy-install.pth` file in that directory should have a line saying "`setuptools-0.6c16dev2.egg`", which causes the `site` module to add that egg to `sys.path` during the default Python initialization. I don't *think* this is supposed to rely on the hack that setuptools installs to `site.py`. That hack should only change the order of `sys.path` entries, so the lack of it wouldn't explain `pkg_resources` not being found at all. pgrunwald: please list the contents of your `<tahoe dir>\support\lib\site-packages` directory, as well as the `easy-install.pth` and `setuptools.pth` files in that directory. Also, with the Tahoe distribution as the current directory, what does this give: ``` set PYTHONPATH= python -c "import pkg_resources; print pkg_resources.require('setuptools')" ``` and this: ``` set PYTHONPATH=support\lib\site-packages python -c "import pkg_resources; print pkg_resources.require('setuptools')" ``` and this: ``` set PYTHONPATH=support\lib\site-packages;support\lib\site-packages\setuptools-0.6c16dev2.egg python -c "import pkg_resources; print pkg_resources.require('setuptools')" ``` ? (Please do *not* install setuptools yet. We'd like to get this working without you having to do that.)
tahoe-lafs changed title from Test errors under Windows 7 -64 Bit to 'ImportError: No module named pkg_resources' errors from runner tests under Windows 7 -64 Bit 2010-11-28 03:03:13 +00:00
zooko commented 2010-11-28 03:57:44 +00:00
Author
Owner

Dear pgrunwald:

allmydata-tahoe-1.8.0-r4803 is from the beginning of this month. Could you please try again with this:

http://tahoe-lafs.org/source/tahoe-lafs/tarballs/allmydata-tahoe-1.8.0-r4850.zip

Dear pgrunwald: allmydata-tahoe-1.8.0-r4803 is from the beginning of this month. Could you please try again with this: <http://tahoe-lafs.org/source/tahoe-lafs/tarballs/allmydata-tahoe-1.8.0-r4850.zip>
pgrunwald commented 2010-11-28 04:07:07 +00:00
Author
Owner
G:\allmydata-tahoe-1.8.0-r4850>python setup.py build
Traceback (most recent call last):
> File "setup.py", line 63, in <module>
    execfile('src/allmydata/_auto_deps.py', adglobals)
IOError: [2]Errno No such file or directory: 'src/allmydata/_auto_deps.py'```

Thnaks,
Paul
``` G:\allmydata-tahoe-1.8.0-r4850>python setup.py build Traceback (most recent call last): > File "setup.py", line 63, in <module> execfile('src/allmydata/_auto_deps.py', adglobals) IOError: [2]Errno No such file or directory: 'src/allmydata/_auto_deps.py'``` Thnaks, Paul
zooko commented 2010-11-28 04:31:07 +00:00
Author
Owner

Replying to pgrunwald:

IOError: [2]Errno No such file or directory: 'src/allmydata/_auto_deps.py'}}}

Cannot reproduce! Could you check whether there is a file there? There is a file there in the .zip file that I linked to.

Replying to [pgrunwald](/tahoe-lafs/trac-2024-07-25/issues/1272#issuecomment-123017): > IOError: [2]Errno No such file or directory: 'src/allmydata/_auto_deps.py'}}} Cannot reproduce! Could you check whether there is a file there? There *is* a file there in the .zip file that I linked to.
pgrunwald commented 2010-11-29 01:09:20 +00:00
Author
Owner
G:\allmydata-tahoe-1.8.0-r4850\src\allmydata>dir
 Volume in drive G is Scratchpad
 Volume Serial Number is FE5F-F7AE

 Directory of G:\allmydata-tahoe-1.8.0-r4850\src\allmydata

11/27/2010  08:38 PM    <DIR>          .
11/27/2010  08:38 PM    <DIR>          ..
11/27/2010  07:12 PM             8,071 check_results.py
11/27/2010  07:12 PM            22,120 client.py
11/27/2010  08:37 PM    <DIR>          immutable
11/27/2010  07:12 PM           115,900 interfaces.py
11/27/2010  07:12 PM            14,749 node.py
11/27/2010  07:12 PM            11,335 reliability.py
11/27/2010  08:38 PM                31 _appname.py
11/27/2010  07:12 PM            10,255 *init*.py
               7 File(s)        182,461 bytes
               3 Dir(s)  468,197,363,712 bytes free```
``` G:\allmydata-tahoe-1.8.0-r4850\src\allmydata>dir Volume in drive G is Scratchpad Volume Serial Number is FE5F-F7AE Directory of G:\allmydata-tahoe-1.8.0-r4850\src\allmydata 11/27/2010 08:38 PM <DIR> . 11/27/2010 08:38 PM <DIR> .. 11/27/2010 07:12 PM 8,071 check_results.py 11/27/2010 07:12 PM 22,120 client.py 11/27/2010 08:37 PM <DIR> immutable 11/27/2010 07:12 PM 115,900 interfaces.py 11/27/2010 07:12 PM 14,749 node.py 11/27/2010 07:12 PM 11,335 reliability.py 11/27/2010 08:38 PM 31 _appname.py 11/27/2010 07:12 PM 10,255 *init*.py 7 File(s) 182,461 bytes 3 Dir(s) 468,197,363,712 bytes free```
davidsarah commented 2010-11-29 01:17:40 +00:00
Author
Owner

It looks like your download of the zip file was incomplete, or it didn't unzip correctly. Please try again, perhaps with different download or unzip tools if you get the same symptoms.

It looks like your download of the zip file was incomplete, or it didn't unzip correctly. Please try again, perhaps with different download or unzip tools if you get the same symptoms.
pgrunwald commented 2010-12-01 02:15:43 +00:00
Author
Owner

Cannot reproduce with 1.8.1 - I got a clean build and passed all tests

Cannot reproduce with 1.8.1 - I got a clean build and passed all tests
tahoe-lafs added the
fixed
label 2010-12-01 02:15:43 +00:00
pgrunwald closed this issue 2010-12-01 02:15:43 +00:00
davidsarah commented 2010-12-01 04:40:40 +00:00
Author
Owner

Reopening in order to resolve as "cannot reproduce".

Reopening in order to resolve as "cannot reproduce".
tahoe-lafs removed the
fixed
label 2010-12-01 04:40:40 +00:00
davidsarah reopened this issue 2010-12-01 04:40:40 +00:00
tahoe-lafs added the
cannot reproduce
label 2010-12-01 04:40:53 +00:00
davidsarah closed this issue 2010-12-01 04:40:53 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#1272
No description provided.