Export to GitHub

python-incompatibility - issue #3

Install fails with a bad path


Posted on Jun 23, 2009 by Massive Monkey

Using Python 3.0.1 on Linux x86 compiled with --prefix=/home/chaz/Programs/Python/3.0.1 and PYTHONPATH=/home/chaz/Libraries/usr/lib/python3.0/site-packages

The output from python setup.py install is as follows:-

creating build/bdist.linux-i686/egg/EGG-INFO copying setuptools.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO copying setuptools.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO copying setuptools.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO copying setuptools.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO copying setuptools.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO copying setuptools.egg-info/zip-safe -> build/bdist.linux-i686/egg/EGG-INFO creating dist creating 'dist/setuptools-0.7a1dev_r66-py3.0.egg' and adding 'build/bdist.linux-i686/egg' to it removing 'build/bdist.linux-i686/egg' (and everything under it) Creating /usr/local/home/chaz/Libraries/usr/lib/python3.0/site-packages/site.py Traceback (most recent call last): File "setup.py", line 95, in <module> scripts = [], File "/home/chaz/Programs/Python/3.0.1/lib/python3.0/distutils/core.py", line 149, in setup dist.run_commands() File "/home/chaz/Programs/Python/3.0.1/lib/python3.0/distutils/dist.py", line 942, in run_commands self.run_command(cmd) File "/home/chaz/Programs/Python/3.0.1/lib/python3.0/distutils/dist.py", line 962, in run_command cmd_obj.run() File "/tmp/setuptools-0.7a1dev-r66/setuptools/command/install.py", line 73, in run self.do_egg_install() File "/tmp/setuptools-0.7a1dev-r66/setuptools/command/install.py", line 101, in do_egg_install cmd.run() File "/tmp/setuptools-0.7a1dev-r66/setuptools/command/easy_install.py", line 225, in run self.easy_install(spec, not self.no_deps) File "/tmp/setuptools-0.7a1dev-r66/setuptools/command/easy_install.py", line 428, in easy_install if not self.editable: self.install_site_py() File "/tmp/setuptools-0.7a1dev-r66/setuptools/command/easy_install.py", line 1105, in install_site_py f.write(source) File "/home/chaz/Programs/Python/3.0.1/lib/python3.0/io.py", line 1038, in write raise TypeError("can't write str to binary stream") TypeError: can't write str to binary stream

It looks as if an additional "/usr/local" has been inserted somewhere it should not have been.

Comment #1

Posted on Jun 24, 2009 by Massive Monkey

Oops, /home/chaz/Libraries is a symlink to /usr/local/home/chaz/Libraries, and the path does exist. Perhaps the problem is because python was compiled with --with-wide-unicode?

Comment #2

Posted on Jun 24, 2009 by Quick Kangaroo

No, I don't think so, that looks like one of the "standard" problems with porting Setuptools to 3.0. In Python 3.0 there is a strict difference between binary and text files, and Python 2 there isn't. The result is that under many circumstances setuptools write binary data to files opened in text mode and vice versa. I thought I had found all those and fixed them, but evidently not.

Comment #3

Posted on Jun 14, 2010 by Quick Kangaroo

Use http://pypi.python.org/pypi/distribute

Status: Verified