python ./setup.py install -- can't create or remove files in install directory #803

Closed
opened 2009-09-14 01:51:00 +00:00 by zooko · 7 comments

bewst reported:

$ python setup.py build
running darcsver
setup.py darcsver: Failure from attempt to find version tags with 'darcs changes', and src/allmydata/_version.py already exists, so leaving it alone.
running develop
Checking .pth file support in support/lib/python2.5/site-packages
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: 'support/lib/python2.5/site-packages/test-easy-install-8824.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    support/lib/python2.5/site-packages

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

This is part of http://bugs.python.org/setuptools/issue54 (be more like distutils with regard to --prefix=). There are some patches to fix this particular detail in zetuptoolz, the fork of setuptools which comes bundled in Tahoe-LAFS under the unfortunate name of [setuptools-0.6c12dev]src:misc/dependencies/setuptools-0.6c12dev.egg?rev=20090205152818-92b7f-68bbee545bd9198bb3c4eb7cf9b84bf7d93e09d6. (I've also submitted the patches to the new Python Distribute Project, which will hopefully be the successor to setuptools: http://bitbucket.org/tarek/distribute/issue/46/be-more-like-distutils-with-regard-to .)

Anyway, the fact that bewst is getting this error message suggests that somehow real setuptools instead of zetuptoolz is being used to try to build Tahoe-LAFS. It's curious to wonder how this could happen. bewst: could you tell me what happens when you run python -c 'import pkg_resources;print pkg_resources.require("setuptools")'?

(bewst initially reported this on ticket #668, but that ticket is about running easy_install allmydata-tahoe and this ticket is about downloading the source, unpacking it, and running python ./setup.py install. This are intimately related, but the latter works for everyone else except bewst and the former doesn't work for anyone yet.)

bewst reported: ``` $ python setup.py build running darcsver setup.py darcsver: Failure from attempt to find version tags with 'darcs changes', and src/allmydata/_version.py already exists, so leaving it alone. running develop Checking .pth file support in support/lib/python2.5/site-packages error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 2] No such file or directory: 'support/lib/python2.5/site-packages/test-easy-install-8824.pth' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: support/lib/python2.5/site-packages This directory does not currently exist. Please create it and try again, or choose a different installation directory (using the -d or --install-dir option). ``` This is part of <http://bugs.python.org/setuptools/issue54> (be more like distutils with regard to --prefix=). There are some patches to fix this particular detail in zetuptoolz, the fork of setuptools which comes bundled in Tahoe-LAFS under the unfortunate name of [setuptools-0.6c12dev]src:misc/dependencies/setuptools-0.6c12dev.egg?rev=20090205152818-92b7f-68bbee545bd9198bb3c4eb7cf9b84bf7d93e09d6. (I've also submitted the patches to the new Python Distribute Project, which will hopefully be the successor to setuptools: <http://bitbucket.org/tarek/distribute/issue/46/be-more-like-distutils-with-regard-to> .) Anyway, the fact that bewst is getting this error message suggests that somehow real setuptools instead of zetuptoolz is being used to try to build Tahoe-LAFS. It's curious to wonder how this could happen. bewst: could you tell me what happens when you run `python -c 'import pkg_resources;print pkg_resources.require("setuptools")'`? (bewst initially reported this on ticket #668, but that ticket is about running `easy_install allmydata-tahoe` and this ticket is about downloading the source, unpacking it, and running `python ./setup.py install`. This are intimately related, but the latter works for everyone else except bewst and the former doesn't work for anyone yet.)
zooko added the
packaging
major
defect
1.5.0
labels 2009-09-14 01:51:00 +00:00
zooko added this to the undecided milestone 2009-09-14 01:51:00 +00:00
Author

bewst: which system was this on, and what do you get from

python -c 'import pkg_resources;print pkg_resources.require("setuptools")'
bewst: which system was this on, and what do you get from ``` python -c 'import pkg_resources;print pkg_resources.require("setuptools")' ```
bewst commented 2009-09-22 02:27:15 +00:00
Owner

It's ubuntu Intrepid and I get


[setuptools 0.7a1dev-r66388 (/usr/lib/python2.5/site-packages/setuptools-0.7a1dev_r66388-py2.5.egg)]
It's ubuntu Intrepid and I get ``` [setuptools 0.7a1dev-r66388 (/usr/lib/python2.5/site-packages/setuptools-0.7a1dev_r66388-py2.5.egg)] ```
Author

Interesting -- you have a newer alpha release of setuptools installed, so Tahoe-LAFS's bundled variant of setuptools won't install because it appears to be an earlier version that your version. #668 which Chris Galvan is currently working on will probably fix this. Assigning this ticket to Chris.

Interesting -- you have a newer alpha release of setuptools installed, so Tahoe-LAFS's bundled variant of setuptools won't install because it appears to be an earlier version that your version. #668 which Chris Galvan is currently working on will probably fix this. Assigning this ticket to Chris.
nodakai commented 2010-01-17 17:38:11 +00:00
Owner

Replying to zooko:

Interesting -- you have a newer alpha release of setuptools installed, so Tahoe-LAFS's bundled variant of setuptools won't install because it appears to be an earlier version that your version.

On Debian testing (== squeeze) amd64, I've got the same problem.
My environment:

$ python -c 'import pkg_resources;print pkg_resources.require("setuptools")'
[distribute 0.6.10 (/usr/lib/python2.5/site-packages)]
$ python -V
Python 2.5.4

I succeeded to get it build by the following workaround:

$ mkdir -p support/lib/python2.5/site-packages
$ export PYTHONPATH=support/lib/python2.5/site-packages:$PYTHONPATH
$ python setup.py build
Replying to [zooko](/tahoe-lafs/trac-2024-07-25/issues/803#issuecomment-72990): > Interesting -- you have a newer alpha release of setuptools installed, so Tahoe-LAFS's bundled variant of setuptools won't install because it appears to be an earlier version that your version. On Debian testing (== squeeze) amd64, I've got the same problem. My environment: ``` $ python -c 'import pkg_resources;print pkg_resources.require("setuptools")' [distribute 0.6.10 (/usr/lib/python2.5/site-packages)] $ python -V Python 2.5.4 ``` I succeeded to get it build by the following workaround: ``` $ mkdir -p support/lib/python2.5/site-packages $ export PYTHONPATH=support/lib/python2.5/site-packages:$PYTHONPATH $ python setup.py build ```
francois commented 2010-03-13 13:55:11 +00:00
Owner

Hey, that's exactly what's happening on my new ARM buildbot running Debian squeeze.

http://allmydata.org/buildbot/builders/FranXois%20lenny-armv5tel/builds/112/steps/build/logs/stdio

Hey, that's exactly what's happening on my new ARM buildbot running Debian squeeze. <http://allmydata.org/buildbot/builders/FranXois%20lenny-armv5tel/builds/112/steps/build/logs/stdio>
Author

My plan is to try replacing setuptools with distribute as well as submitting a couple of patches to distribute (http://bitbucket.org/tarek/distribute/issue/136/respect-the-pythonpath and http://bitbucket.org/tarek/distribute/issue/46/be-more-like-distutils-with-regard-to ).

(Help appreciated.)

My plan is to try replacing setuptools with distribute as well as submitting a couple of patches to distribute (<http://bitbucket.org/tarek/distribute/issue/136/respect-the-pythonpath> and <http://bitbucket.org/tarek/distribute/issue/46/be-more-like-distutils-with-regard-to> ). (Help appreciated.)
zooko modified the milestone from undecided to 1.7.0 2010-04-12 17:25:15 +00:00
Author

Fixed by changeset:ba8f0c27f07199a4, changeset:7b3a9a3d0eb7432f, changeset:0b306e31cee93a90.

Fixed by changeset:ba8f0c27f07199a4, changeset:7b3a9a3d0eb7432f, changeset:0b306e31cee93a90.
zooko added the
fixed
label 2010-05-30 21:42:27 +00:00
zooko closed this issue 2010-05-30 21:42:27 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

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