Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 620966 - dev-python/matplotlib-2.0.2: ImportError: No module named externals
Summary: dev-python/matplotlib-2.0.2: ImportError: No module named externals
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-05 23:57 UTC by Andrey Grozin
Modified: 2017-09-15 15:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Grozin gentoo-dev 2017-06-05 23:57:43 UTC
* python2_7: running distutils-r1_run_phase python_compile_all
Traceback (most recent call last):
  File "../examples/frontpage/plot_3D.py", line 9, in <module>
    from mpl_toolkits.mplot3d import Axes3D
  File "/usr/lib64/python2.7/site-packages/mpl_toolkits/mplot3d/__init__.py", line 4, in <module>
    from matplotlib.externals import six
ImportError: No module named externals
Traceback (most recent call last):
  File "./make.py", line 309, in <module>
    func()
  File "./make.py", line 119, in html
    generate_frontpage_pngs()
  File "./make.py", line 85, in generate_frontpage_pngs
    subprocess.check_call(["python", pn_py])  # raises CalledProcessError()
  File "/usr/lib64/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '../examples/frontpage/plot_3D.py']' returned non-zero exit status 1
 * ERROR: dev-python/matplotlib-2.0.2::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  115:  Called src_compile
 *   environment, line 4283:  Called distutils-r1_src_compile
 *   environment, line 1261:  Called _distutils-r1_run_common_phase 'python_compile_all'
 *   environment, line  444:  Called multibuild_foreach_variant 'distutils-r1_run_phase' 'python_compile_all'
 *   environment, line 2751:  Called _multibuild_run 'distutils-r1_run_phase' 'python_compile_all'
 *   environment, line 2749:  Called distutils-r1_run_phase 'python_compile_all'
 *   environment, line 1249:  Called python_compile_all
 *   environment, line 3256:  Called die
 * The specific snippet of code:
 *           VARTEXFONTS="${T}"/fonts "${EPYTHON}" ./make.py --small html || die;

dns ~ # emerge -pqv '=dev-python/matplotlib-2.0.2::gentoo'
[ebuild     U ] dev-python/matplotlib-2.0.2 [1.5.3-r1] USE="cairo doc latex qt4 qt5 tk wxwidgets -examples -excel -gtk2 -gtk3 -pyside {-test} (-fltk%)" PYTHON_TARGETS="python2_7 python3_5 python3_6 -python3_4" 

dns ~ # emerge --info '=dev-python/matplotlib-2.0.2::gentoo'
Portage 2.3.6 (python 3.5.3-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-6.3.0, glibc-2.24-r1, 4.9.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-3610QM_CPU_@_2.30GHz-with-gentoo-2.3
KiB Mem:     8074528 total,   2523440 free
KiB Swap:   10485756 total,  10485392 free
Timestamp of repository gentoo: Mon, 05 Jun 2017 15:45:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.27::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo, 5.4.0-r3::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

lisp
    location: /var/lib/layman/lisp
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

grozin
    location: /usr/local/portage
    masters: gentoo
    priority: 60

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /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="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acpi alsa amd64 bash-completion berkdb blas bluetooth boehm-gc branding browserplugin bzip2 cairo cdda cdr cli consolekit cracklib crypt css cups curl cxx dbus declarative dirac doc dri dvd emacs enca encode exif fam ffmpeg fftw firefox flac fortran gd gdbm gif glamor gmp gpm gsl gtk iconv imagemagick jpeg kde kipi kpathsea kwallet lapack latex lcms ldap libnotify lzma mad mng modules mozilla mp3 mp4 mpeg multilib ncurses nls nptl nsplugin offensive ogg opengl openmp pam pango pcre pdf phonon plasma plotutils png policykit ppds python qml qt3support qt4 qt5 readline schroedinger sdl seccomp semantic-desktop session speex spell ssl startup-notification svg tcl tcpd theora tiff tk truetype udev udisks umfpack unicode upower usb v4l2 vorbis widgets win32codecs wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby22 ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="intel" 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"
USE_PYTHON="2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Benda Xu gentoo-dev 2017-07-09 04:28:34 UTC
This only happens when upgrading from 1.5.3-r1 and with USE=doc.

The build system relies on PYTHONPATH to locate the newly built and not merged matplotlib-2.0.2 libraries to build documentation.  But in python PYTHONPATH does not override the site-packages.  If 1.5.3-r1 in site-packages is not API-compatible with 2.0.2, this error is raised.
Comment 2 Benda Xu gentoo-dev 2017-07-09 05:03:05 UTC
There is no solution of python to override the site-packages.

PYTHONSTARTUP only works for interactive sessions. PYTHONPATH is not designed for it.

We are doomed. The only ways are:

  1. have matplotlib-2.0.2 conflict with '<matplotlib-1.5.3-r1'
  2. split off matplotlib[doc] as a separate package to depend on the same version of matplotlib.
Comment 3 Stephen Bosch 2017-09-15 15:55:13 UTC
I managed to get around this by first uninstalling matplotlib-1.5.3, but then I was confronted with this bizarre error:

Warning, treated as error:
/var/tmp/portage/dev-python/matplotlib-2.0.2/work/matplotlib-2.0.2-python2_7/doc/devel/MEP/MEP12.rst:185:Footnote [2] is not referenced.
Building HTML failed.
 * ERROR: dev-python/matplotlib-2.0.2::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  115:  Called src_compile
 *   environment, line 4387:  Called distutils-r1_src_compile
 *   environment, line 1293:  Called _distutils-r1_run_common_phase 'python_compile_all'
 *   environment, line  476:  Called multibuild_foreach_variant 'distutils-r1_run_phase' 'python_compile_all'
 *   environment, line 2838:  Called _multibuild_run 'distutils-r1_run_phase' 'python_compile_all'
 *   environment, line 2836:  Called distutils-r1_run_phase 'python_compile_all'
 *   environment, line 1281:  Called python_compile_all
 *   environment, line 3359:  Called die
 * The specific snippet of code:
 *           VARTEXFONTS="${T}"/fonts "${EPYTHON}" ./make.py --small html || die;
 * 
 * If you need support, post the output of `emerge --info '=dev-python/matplotlib-2.0.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/matplotlib-2.0.2::gentoo'`.
 * The complete build log is located at '/var/log/portage/dev-python:matplotlib-2.0.2:20170915-143946.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/matplotlib-2.0.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/matplotlib-2.0.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/matplotlib-2.0.2/work/matplotlib-2.0.2-python2_7/doc'
 * S: '/var/tmp/portage/dev-python/matplotlib-2.0.2/work/matplotlib-2.0.2'

>>> Failed to emerge dev-python/matplotlib-2.0.2, Log file:

>>>  '/var/log/portage/dev-python:matplotlib-2.0.2:20170915-143946.log'

 * Messages for package dev-python/matplotlib-2.0.2:

 * ERROR: dev-python/matplotlib-2.0.2::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  115:  Called src_compile
 *   environment, line 4387:  Called distutils-r1_src_compile
 *   environment, line 1293:  Called _distutils-r1_run_common_phase 'python_compile_all'
 *   environment, line  476:  Called multibuild_foreach_variant 'distutils-r1_run_phase' 'python_compile_all'
 *   environment, line 2838:  Called _multibuild_run 'distutils-r1_run_phase' 'python_compile_all'
 *   environment, line 2836:  Called distutils-r1_run_phase 'python_compile_all'
 *   environment, line 1281:  Called python_compile_all
 *   environment, line 3359:  Called die
 * The specific snippet of code:
 *           VARTEXFONTS="${T}"/fonts "${EPYTHON}" ./make.py --small html || die;
 * 
 * If you need support, post the output of `emerge --info '=dev-python/matplotlib-2.0.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/matplotlib-2.0.2::gentoo'`.
 * The complete build log is located at '/var/log/portage/dev-python:matplotlib-2.0.2:20170915-143946.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/matplotlib-2.0.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/matplotlib-2.0.2/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-python/matplotlib-2.0.2/work/matplotlib-2.0.2-python2_7/doc'
 * S: '/var/tmp/portage/dev-python/matplotlib-2.0.2/work/matplotlib-2.0.2'

I could only build matplotlib with USE=-doc.

I guess we need to split off the docs if there is no way around this. Are there any other examples of ebuilds conflicting with previous versions of the same package? That doesn't seem sensible.