error using python 2.4.2 on Suse 10.1

43 views
Skip to first unread message

Malte Marquarding

unread,
Mar 12, 2008, 12:57:52 AM3/12/08
to virtualenv
When I try to run (virtualenv-1.0)

python virtualenv.py ~/localpy

I get

New python executable in /home/me/localpy/bin/python
Installing setuptools.............................
Complete output from command /home/me/localpy/bin/python -c "#!
python
\"\"\"Bootstrap setuptoo...




" support-files/setuptools-0.6c7-py2.4.egg:
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 13] Permission denied: '/usr/local/lib/python2.4/site-
packages/test-easy-install-26146.pth'

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

/usr/local/lib/python2.4/site-packages/

Perhaps your account does not have write access to this directory? If
the
installation directory is a system-owned directory, you may need to
sign in
as the administrator or "root" account. If you do not have
administrative
access to this machine, you may wish to choose a different
installation
directory, preferably one that is listed in your PYTHONPATH
environment
variable.

For information on other options, you may wish to consult the
documentation at:

http://peak.telecommunity.com/EasyInstall.html

Please make the appropriate changes for your system and try again.

----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
File "virtualenv.py", line 827, in ?
main()
File "virtualenv.py", line 337, in main
create_environment(home_dir, site_packages=not
options.no_site_packages, clear=options.clear)
File "virtualenv.py", line 536, in create_environment
install_setuptools(py_executable)
File "virtualenv.py", line 260, in install_setuptools
extra_env=env)
File "virtualenv.py", line 396, in call_subprocess
raise OSError(
OSError: Command /home/me/localpy/bin/python -c "#!python
\"\"\"Bootstrap setuptoo...




" support-files/setuptools-0.6c7-py2.4.egg failed with error code 1


Any suggestions what might be going on. I tried verbose output, but
didn't get any more information.
I have no PYTHONPATH set and have no ~/.pydisutils.cfg

Cheers,
Malte.

k4ml

unread,
Apr 3, 2008, 8:36:59 PM4/3/08
to virtualenv
I got this error too with Python 2.5 on opensuse 10.3. Look's like
setuptools does not use the python environment from the new
'virtualized' interpreter and instead used the default system wide
where we don't have write access to the site-packages directory. On
opensuse 10.0, virtualenv work without any problem and I can't see any
diff from both of the file:-

OpenSUSE 10.3 - /usr/local/lib/python2.5/site-packages/virtualenv-1.0-
py2.5.egg/virtualenv.py
OpenSUSE 10.0 - /usr/local/lib/python2.5/site-packages/virtualenv-1.0-
py2.5.egg/virtualenv.py

Both are identical.

Malte Marquarding

unread,
May 17, 2008, 6:36:43 PM5/17/08
to virtualenv
Hi,

I have worked this one out. Suse modifies the systems (/usr/lib/
python...) distutils.cfg to stcik everything into /usr/local.
The virtualenv script copies this file over, and doesn't modify it
with its own version. A simple hack of modifying virtualenv.py

def install_distutils(lib_dir):
distutils_path = os.path.join(lib_dir, 'distutils')
mkdir(distutils_path)
writefile(os.path.join(distutils_path, '__init__.py'),
DISTUTILS_INIT)
writefile(os.path.join(distutils_path, 'distutils.cfg'),
DISTUTILS_CFG, overwrite=False)

to use overwrite=True. Fixes this.

I guess this should be addressed in the release proper.

Cheers,
Malte.

k4ml

unread,
Jul 13, 2008, 5:31:12 AM7/13/08
to virtualenv
> def install_distutils(lib_dir):
> distutils_path = os.path.join(lib_dir, 'distutils')
> mkdir(distutils_path)
> writefile(os.path.join(distutils_path, '__init__.py'),
> DISTUTILS_INIT)
> writefile(os.path.join(distutils_path, 'distutils.cfg'),
> DISTUTILS_CFG, overwrite=False)
>
> to use overwrite=True. Fixes this.
Doesn't work on OpenSUSE 10.3 so I just commented out the prefix line
in disutils.cfg.

Malte Marquarding

unread,
Jul 14, 2008, 8:16:37 PM7/14/08
to virtualenv
Hi,

sorry you are correct. I have created a launchpad issue and have
attached a patch which is working for me.

Cheers,
Malte.

miniwark

unread,
Jul 23, 2008, 7:31:36 AM7/23/08
to virtualenv
> > Doesn't work on OpenSUSE 10.3 so I just commented out the prefix line
> > in disutils.cfg.

I confirm than this workaround to comment the prefix line in /usr/
lib64/python2.5/distutils/distutils.cfg
works for me too on SUSE 11.0

I have also test before the change of overwrite=True in virtualenv.py
but it confirm than this does not work.

I have report this bug to OpenSuse team see :
https://bugzilla.novell.com/show_bug.cgi?id=411541



Reply all
Reply to author
Forward
0 new messages