[Distutils] installing to a non-standard directory

P.J. Eby pje at telecommunity.com
Sat Nov 20 02:51:41 CET 2010

At 03:18 PM 11/19/2010 -0800, K. Richard Pixley wrote:
>I'm trying to install to a non-standard directory.

Why?  It makes a difference as to what the best way to do it is.

For example, if you're planning to install a Python application or 
create a restricted development environment, you might be better off 
using a virtualenv.  Or, alternatively, you may want to configure 
your ~/.pydistutils.cfg to set the default installation paths rather 
than having to specify them on the command line for every package you install.

>distutils.errors.DistutilsError: 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: 
> '/home/rich/projects/rcmp/junk/lib/python2.6/site-packages/test-easy-install-12743.pth'
>The installation directory you specified (via --install-dir, --prefix, or
>the distutils default setting) was:
>     /home/rich/projects/rcmp/junk/lib/python2.6/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

As the above says, the path you're trying to install to doesn't 
exist.  (The next thing you'll find after you fix that, is that it 
isn't on your PYTHONPATH.)

What are you trying to install, and why do you want to install it in 
that specific directory?

More information about the Distutils-SIG mailing list