one_and_only Apprentice

Joined: 13 May 2007 Posts: 238 Location: PL/Krakow
|
Posted: Tue Feb 09, 2010 1:11 am Post subject: [sage-on-gentoo] python problem? |
|
|
While emerging sage from sage-on gentoo i got:
| Code: | gcc version 4.4.2 (Gentoo 4.4.2 p1.0)
****************************************************
Deleting old networkX installs
Patching
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "setup.py", line 63, in <module>
classifiers = classifiers,
File "/usr/lib64/python2.6/distutils/core.py", line 138, in setup
ok = dist.parse_command_line()
File "/usr/lib64/python2.6/distutils/dist.py", line 460, in parse_command_line
args = self._parse_command_opts(parser, args)
File "/usr/lib64/python2.6/distutils/dist.py", line 518, in _parse_command_opts
cmd_class = self.get_command_class(command)
File "/usr/lib64/python2.6/distutils/dist.py", line 837, in get_command_class
__import__ (module_name)
File "/usr/lib64/python2.6/distutils/command/install.py", line 21, in <module>
from site import USER_BASE
File "/usr/lib64/python2.6/site-packages/site.py", line 73, in <module>
__boot()
File "/usr/lib64/python2.6/site-packages/site.py", line 33, in __boot
imp.load_module('site',stream,path,descr)
File "/usr/lib64/python2.6/site.py", line 514, in <module>
main()
File "/usr/lib64/python2.6/site.py", line 497, in main
known_paths = addsitepackages(known_paths)
File "/usr/lib64/python2.6/site.py", line 289, in addsitepackages
addsitedir(sitedir, known_paths)
File "/usr/lib64/python2.6/site.py", line 185, in addsitedir
addpackage(sitedir, name, known_paths)
File "/usr/lib64/python2.6/site.py", line 155, in addpackage
exec line
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'setdefaultencoding'
real 0m0.073s
user 0m0.038s
sys 0m0.016s
sage: An error occurred while installing networkx-0.99.p1-fake_really-0.36.p1
|
For me it looks like python problem because in site.py there is:
| Code: | if encoding != "ascii":
# On Non-Unicode builds this will raise an AttributeError...
sys.setdefaultencoding(encoding) # Needs Python Unicode build ! |
But i have python compiled with wide-unicode. So, what's the problem?
| Code: | [ebuild R ] dev-lang/python-2.6.4-r99 USE="berkdb doc examples gdbm ipv6 ncurses readline sqlite ssl threads (wide-unicode) xml -build -tk -wininst" 0 kB [1]
|
My emerge --info:
| Code: | emerge --info
Portage 2.3_pre15303 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.31-zen10 x86_64)
=================================================================
System uname: Linux-2.6.31-zen10-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 08 Feb 2010 14:00:24 +0000
app-shells/bash: 4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python: 2.6.4-r99, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/cmake: 2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc: 0.6.0-r1
sys-apps/sandbox: 2.2
sys-devel/autoconf: 2.13, 2.65
sys-devel/automake: 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils: 2.20
sys-devel/gcc: 4.4.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6b
virtual/os-headers: 2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -msse4.1 -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -msse4.1 -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.dsv.agh.edu.pl http://gentoo.mirror.pw.edu.pl/"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="pl en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/zen-sources /usr/local/portage/layman/kde /usr/local/portage/layman/voyageur /usr/local/portage/layman/otih /usr/local/portage/layman/mpd /usr/local/portage/layman/roslin /usr/local/portage/layman/arcon /usr/local/portage/layman/roslin /usr/local/portage/layman/sunrise /usr/local/portage/layman/qting-edge /usr/local/portage/layman/science /usr/local/portage/layman/mozilla /usr/local/portage/layman/Eaedificata /usr/local/portage/layman/sage-on-gentoo /usr/local/portage/one"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss enca encode evo exif fam firefox flac fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 jpeg jpeg2k kde laptop ldap libnotify lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl png policykit ppds pppd python qt3support qt4 quicktime readline reflection ruby sdl semantic-desktop session slang spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vim-syntax vorbis wicd x264 xcomposite xml xorg xulrunner xv xvid zlib zsh-completion" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS |
OK, I did an ugly, ugly hack, I commented out those lines in /usr/lib64/python2.6/site.py:
| Code: |
if hasattr(sys, "setdefaultencoding"):
del sys.setdefaultencoding
|
and compilation goes OK, but I assume, that there is some kind of error in ebuild or installer and function setdefaultencoding should be called (imported) in different way? |
|