# [python et ses modules] Problème avec tagpy

## idodesuke

```
running build_ext

running install

running install_lib

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

copying build-2.7/lib.linux-x86_64-2.7/tagpy/__init__.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

copying build-2.7/lib.linux-x86_64-2.7/tagpy/ape.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

copying build-2.7/lib.linux-x86_64-2.7/tagpy/flac.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

copying build-2.7/lib.linux-x86_64-2.7/tagpy/id3v1.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

copying build-2.7/lib.linux-x86_64-2.7/tagpy/id3v2.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

copying build-2.7/lib.linux-x86_64-2.7/tagpy/mpc.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

copying build-2.7/lib.linux-x86_64-2.7/tagpy/mpeg.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy

creating /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy/ogg

copying build-2.7/lib.linux-x86_64-2.7/tagpy/ogg/__init__.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy/ogg

copying build-2.7/lib.linux-x86_64-2.7/tagpy/ogg/flac.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy/ogg

copying build-2.7/lib.linux-x86_64-2.7/tagpy/ogg/vorbis.py -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy/ogg

copying build-2.7/lib.linux-x86_64-2.7/_tagpy.so -> /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages

warning: install_lib: byte-compiling is disabled, skipping.

running install_egg_info

running egg_info

writing tagpy.egg-info/PKG-INFO

writing top-level names to tagpy.egg-info/top_level.txt

writing dependency_links to tagpy.egg-info/dependency_links.txt

reading manifest file 'tagpy.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'tagpy.egg-info/SOURCES.txt'

Copying tagpy.egg-info to /var/tmp/portage/dev-python/tagpy-0.94.8/temp/images/2.7/usr/lib64/python2.7/site-packages/tagpy-0.94.8-py2.7.egg-info

running install_scripts

>>> Completed installing tagpy-0.94.8 into /var/tmp/portage/dev-python/tagpy-0.94.8/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment

   usr/lib64/python2.7/site-packages/_tagpy.so

>>> Installing (1 of 1) dev-python/tagpy-0.94.8

 * Compilation and optimization of Python modules for CPython 2.7 ...                                                                                                    [ ok ]

>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: 6 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.
```

```
ido@zalem g_swinnen 05:43

$equery belongs /usr/lib64/libboost_python-mt-1_42.so.1.42.0

!!! Invalid PORTDIR_OVERLAY (not a dir): '/usr/local/portage'

!!! Invalid PORTDIR_OVERLAY (not a dir): '/usr/local/iportage'

 * Searching for /usr/lib64/libboost_python-mt-1_42.so.1.42.0 ... 

dev-libs/boost-1.42.0-r2 (/usr/lib64/libboost_python-mt-1_42.so.1.42.0)
```

```
root@zalem ~ 06:15

$eselect python list

Available Python interpreters:

  [1]   python2.6

  [2]   python2.7

  [3]   python3.1 *

root@zalem ~ 06:20

$eselect python show

python3.1
```

```
ido@zalem my_code 06:11

$python2.7

Python 2.7.1 (r271:86832, Aug 22 2011, 16:34:20) 

[GCC 4.4.5] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import tagpy

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/lib64/python2.7/site-packages/tagpy/__init__.py", line 24, in <module>

    import _tagpy

ImportError: /usr/lib64/libboost_python-mt-1_46.so.1.46.1: undefined symbol: PyBytes_Size

>>> 

[code]ido@zalem my_code 06:11

$python

Python 3.1.3 (r313:86834, Aug 22 2011, 16:37:21) 

[GCC 4.4.5] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import tagpy

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

ImportError: No module named tagpy

>>> [/code]

root@zalem ~ 06:20

$emerge --info

!!! Invalid PORTDIR_OVERLAY (not a dir): '/usr/local/portage'

!!! Invalid PORTDIR_OVERLAY (not a dir): '/usr/local/iportage'

Portage 2.1.10.3 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.12.2-r0, 2.6.32-gentoo-r7-ido-001 x86_64)

=================================================================

System uname: Linux-2.6.32-gentoo-r7-ido-001-x86_64-AMD_Processor_model_-with-gentoo-2.0.3

Timestamp of tree: Mon, 29 Aug 2011 20:00:01 +0000

app-shells/bash:          4.1_p9

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.6.6-r2, 2.7.1-r1, 3.1.3-r1

dev-util/cmake:           2.8.4-r1

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      2.0.3

sys-apps/openrc:          0.8.3-r1

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1

sys-devel/binutils:       2.20.1-r1

sys-devel/gcc:            4.4.5

sys-devel/gcc-config:     1.4.1-r1

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82

sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)

sys-libs/glibc:           2.12.2

Repositories: gentoo

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA dlj-1.1"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -msse3 -pipe -O2"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=k8 -msse3 -pipe -O2"

DISTDIR="/distfiles"

FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LANG="en_US.UTF-8"

LC_ALL="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en fr"

MAKEOPTS="-j3"

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=""

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac acl adns alsa amd64 asf automount bash-completion bzip2 cairo cdparanoia cdr cjk cli cracklib crypt cups cxx dbus dlloader dri esd exif ffmpeg flac fontconfig fortran ftp gdbm gif gnome gpm gstreamer gtk iconv imagemagick ipv6 jack java javascript jpeg jpeg2k lame live mad matroska midi mjpeg mmx mng modules mp3 mpeg mplayer mudflap multilib musepack ncurses nls nptl nptlonly nvidia ogg openal opengl openmp pam pcre pdf perl png pppd pulseaudio python readline sdl session slang smp speex sse sse2 ssl svg sysfs tcltk tcpd tetex tga theora threads tiff truetype unicode usb userlocales utf8 v41 vcd vorbis wmf x264 xcb xcomposite xorg xvid zlib" ALSA_CARDS="emu10k1" 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
```

Je vais essayer de ne pas utiliser tagpy pour le moment puis c'est tout.

----------

## idodesuke

ben si j'installe d'autres modules c'est dans le répertoire python2.7 aussi que ça s'installe.

```
>>> Installing (1 of 1) dev-python/imaging-1.1.7

 * checking 102 files for package collisions

>>> Merging dev-python/imaging-1.1.7 to /

--- /usr/

--- /usr/lib64/

--- /usr/lib64/python2.7/

--- /usr/lib64/python2.7/site-packages/

>>> /usr/lib64/python2.7/site-packages/PIL/

>>> /usr/lib64/python2.7/site-packages/PIL/__init__.py

>>> /usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/BdfFontFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/BmpImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/BufrStubImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/ContainerIO.py

>>> /usr/lib64/python2.7/site-packages/PIL/CurImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/DcxImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/EpsImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/ExifTags.py

>>> /usr/lib64/python2.7/site-packages/PIL/FitsStubImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/FliImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/FontFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/FpxImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/GbrImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/GdImageFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/GifImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/GimpGradientFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/GimpPaletteFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/GribStubImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/Hdf5StubImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/IcoImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/IcnsImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/Image.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageChops.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageCms.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageColor.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageDraw.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageDraw2.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageEnhance.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageFileIO.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageFilter.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageFont.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageGL.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageGrab.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageMath.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageMode.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageOps.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImagePalette.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImagePath.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageQt.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageSequence.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageShow.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageStat.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageTk.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageTransform.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImageWin.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/ImtImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/IptcImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/JpegImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/McIdasImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/MicImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/MpegImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/MspImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/OleFileIO.py

>>> /usr/lib64/python2.7/site-packages/PIL/PaletteFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/PalmImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PcdImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PcfFontFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/PcxImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PdfImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PixarImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PngImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PpmImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PsdImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/PSDraw.py

>>> /usr/lib64/python2.7/site-packages/PIL/SgiImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/SpiderImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/SunImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/TarIO.py

>>> /usr/lib64/python2.7/site-packages/PIL/TgaImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/TiffImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/TiffTags.py

>>> /usr/lib64/python2.7/site-packages/PIL/WalImageFile.py

>>> /usr/lib64/python2.7/site-packages/PIL/WmfImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/XbmImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/XpmImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/XVThumbImagePlugin.py

>>> /usr/lib64/python2.7/site-packages/PIL/_imaging.so

>>> /usr/lib64/python2.7/site-packages/PIL/_imagingft.so

>>> /usr/lib64/python2.7/site-packages/PIL/_imagingcms.so

>>> /usr/lib64/python2.7/site-packages/PIL/_imagingtk.so

>>> /usr/lib64/python2.7/site-packages/PIL/_imagingmath.so

>>> /usr/lib64/python2.7/site-packages/PIL/PIL-1.1.7-py2.7.egg-info

>>> /usr/lib64/python2.7/site-packages/PIL.pth
```

```
ido@zalem my_code 07:06

$python2.7

Python 2.7.1 (r271:86832, Aug 22 2011, 16:34:20) 

[GCC 4.4.5] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import Image

>>> 

ido@zalem my_code 07:07

$python3.1 

Python 3.1.3 (r313:86834, Aug 22 2011, 16:37:21) 

[GCC 4.4.5] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import Image

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

ImportError: No module named Image

>>> 

```

----------

## idodesuke

J'ai un répertoire "/usr/lib64/portage/pym" qui contient pas mal de choses.

```
ido@zalem env.d 07:17

$grep -E -i 'PYTHON' *

05portage.envd:PYTHONPATH="/usr/lib64/portage/pym"

ido@zalem env.d 07:18

$ls /usr/lib64/portage/pym

_emerge  portage  repoman
```

----------

## xaviermiller

Salut,

L'installation s'est bien passée.

La seule chose que je vois, c'est qu'il te manquerait une dépendance, pour définir PyBytes_Size" entre aures

L'erreur de PORTDIR, c'est que dans ton make.conf, tu mentionnes un overlay local qui n'existe pas. Mais ce n'est pas une erreur bloquante.

----------

