Opened 6 years ago

Closed 6 years ago

#3206 defect closed invalid (invalid)

Cannot install Twisted to a custom location on OS X 10.5

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: release management Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

neutron:trunk exarkun$ python setup.py install --prefix ~/custom-location/
running install
Checking .pth file support in /Users/exarkun/custom-location//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: '/Users/exarkun/custom-location//lib/python2.5/site-packages/test-easy-install-22605.pth'

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

    /Users/exarkun/custom-location//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).

Fine:

neutron:trunk exarkun$ mkdir -p /Users/exarkun/custom-location//lib/python2.5/site-packages/
neutron:trunk exarkun$ python setup.py install --prefix ~/custom-location/
running install
Checking .pth file support in /Users/exarkun/custom-location//lib/python2.5/site-packages/
/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python -E -c pass
TEST FAILED: /Users/exarkun/custom-location//lib/python2.5/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Users/exarkun/custom-location//lib/python2.5/site-packages/

and your PYTHONPATH environment variable currently contains:

    '/Users/exarkun/Projects/Divmod/trunk/Combinator:/Users/exarkun/.local/lib/python2.4/site-packages'

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations

Please make the appropriate changes for your system and try again.
neutron:trunk exarkun$

Change History (4)

comment:1 Changed 6 years ago by therve

2 solutions :

  • PYTHONPATH=~/custom-location python setup.py install --prefix ~/custom-location
  • python twisted/topfiles/setup.py install --prefix ~/custom-location

I don't think I have anything better to propose. Maybe put back the old setup.py with another name?

comment:2 Changed 6 years ago by exarkun

It also seems to work to edit setup.py and delete the code at the top which tries to import setuptools. This relies on setuptools not being imported somewhere else, though - for example, sitecustomize.py.

comment:3 Changed 6 years ago by radix

  • Resolution set to invalid
  • Status changed from new to closed

setuptools sucks, sorry

comment:4 Changed 3 years ago by <automation>

  • Owner radix deleted
Note: See TracTickets for help on using tickets.