Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653480 - dev-python/flake8 - ImportError: No module named configparser
Summary: dev-python/flake8 - ImportError: No module named configparser
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-18 15:43 UTC by Alejandro
Modified: 2018-04-19 04:39 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 Alejandro 2018-04-18 15:43:01 UTC
Trying to emerge subliminal, which install python-pbr as a dependency I am getting the following error:

```
>>> Emerging (14 of 18) dev-python/pbr-3.1.1::gentoo
 * pbr-3.1.1.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                                                                                                            [ ok ]
>>> Unpacking source...
>>> Unpacking pbr-3.1.1.tar.gz to /home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work
>>> Source unpacked in /home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work
>>> Preparing source in /home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1 ...
 * rogue tests disabled
>>> Source prepared.
>>> Configuring source in /home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1 ...
>>> Source configured.
>>> Compiling source in /home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1 ...
 * python2_7: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python2.7 setup.py build
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    **util.cfg_to_args())
  File "/home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1/pbr/util.py", line 267, in cfg_to_args
    wrap_commands(kwargs)
  File "/home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1/pbr/util.py", line 569, in wrap_commands
    cmdclass = ep.resolve()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2428, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib64/python2.7/site-packages/flake8/main/setuptools_command.py", line 6, in <module>
    from flake8.main import application as app
  File "/usr/lib64/python2.7/site-packages/flake8/main/application.py", line 14, in <module>
    from flake8.main import options
  File "/usr/lib64/python2.7/site-packages/flake8/main/options.py", line 4, in <module>
    from flake8.main import vcs
  File "/usr/lib64/python2.7/site-packages/flake8/main/vcs.py", line 4, in <module>
    from flake8.main import mercurial
  File "/usr/lib64/python2.7/site-packages/flake8/main/mercurial.py", line 7, in <module>
    import configparser
ImportError: No module named configparser
 * ERROR: dev-python/pbr-3.1.1::gentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 2571:  Called distutils-r1_src_compile
 *   environment, line  782:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  313:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2121:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 1496:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 1494:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line  516:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line  773:  Called distutils-r1_python_compile
 *   environment, line  648:  Called esetup.py 'build'
 *   environment, line 1041:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 * 
 * If you need support, post the output of `emerge --info '=dev-python/pbr-3.1.1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-python/pbr-3.1.1::gentoo'`.
 * The complete build log is located at '/home/hkr/ssd2/portage/dev-python/pbr-3.1.1/temp/build.log'.
 * The ebuild environment file is located at '/home/hkr/ssd2/portage/dev-python/pbr-3.1.1/temp/environment'.
 * Working directory: '/home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1'
 * S: '/home/hkr/ssd2/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1'

>>> Failed to emerge dev-python/pbr-3.1.1, Log file:
```

I've read here (https://stackoverflow.com/a/14087705) that is due to ConfigParser has been renamed to configparser for PEP 8 compliance.

How could I resolve this problem? Here is all information:

emerge --info '=dev-python/pbr-3.1.1::gentoo'
Portage 2.3.24 (python 2.7.14-final-0, default/linux/amd64/17.0/desktop, gcc-6.4.0, glibc-2.25-r11, 4.9.76-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.76-gentoo-r1-x86_64-Intel-R-_Core-TM-_i3-3110M_CPU_@_2.40GHz-with-gentoo-2.4.1
KiB Mem:    12177152 total,    521540 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Wed, 18 Apr 2018 10:30:01 +0000
Head commit of repository gentoo: 36b84a01fc96092257f611787ff760a39158beb2
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r11::gentoo
Repositories:

gentoo
    location: /home/hkr/ssd2/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts: 

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

rinaldus-overlay
    location: /var/lib/layman/rinaldus-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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="/home/hkr/ssd2/"
USE="X aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus dri dts emboss encode exif fam flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support readline sdl seccomp spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xft xinerama xml 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="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="intel i965" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


And 

emerge -pqv '=dev-python/pbr-3.1.1::gentoo'
[ebuild  N    ] dev-python/pbr-3.1.1  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6"

Bests
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2018-04-18 19:27:44 UTC
looks like it's actually flake8

  File "/usr/lib64/python2.7/site-packages/flake8/main/mercurial.py", line 7, in <module>
    import configparser
ImportError: No module named configparser
Comment 2 Alejandro 2018-04-18 19:29:46 UTC
Oh, you are right, sorry. Should I open other bug and close this?
Comment 3 Alejandro 2018-04-18 19:30:52 UTC
(In reply to Alejandro from comment #2)
> Oh, you are right, sorry. Should I open other bug and close this?

Just saw you changed the title, thanks.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-18 19:31:58 UTC
What is the version of flake8?  The deps in ebuild look fine at a first glance.
Comment 5 Alejandro 2018-04-18 19:39:28 UTC
(In reply to Michał Górny from comment #4)
> What is the version of flake8?  The deps in ebuild look fine at a first
> glance.

How could I see it? When I emerge subliminal, flake8 is not listed in the dependency graph.

_ emerge -atvn subliminal

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild  N     ] media-video/subliminal-2.0.5-r1::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4" 0 KiB
[ebuild  N     ]  virtual/python-futures-0::gentoo  PYTHON_TARGETS="python2_7 python3_5 (-pypy) -python3_4 -python3_6" 0 KiB
[ebuild  N     ]   dev-python/futures-3.1.1::gentoo  USE="-doc" PYTHON_TARGETS="python2_7 (-pypy)" 0 KiB
[ebuild  N     ]  dev-python/stevedore-1.28.0::gentoo  USE="-doc {-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
[ebuild  N     ]   dev-python/pbr-3.1.1::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/guessit-2.1.4::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
[ebuild  N     ]   dev-python/rebulk-0.9.0::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
[ebuild  NS    ]  dev-python/beautifulsoup-4.5.1:4::gentoo [3.2.1-r1:python-2::gentoo] USE="-doc {-test}" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 0 KiB
[ebuild  N     ]   dev-python/html5lib-0.9999999::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/click-6.7::gentoo  USE="-doc -examples {-test}" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/dogpile-cache-0.6.4::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/pysrt-1.1.1::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/pytz-2017.2::gentoo  PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/enzyme-0.4.1-r2::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/babelfish-0.5.5-r1::gentoo  PYTHON_TARGETS="python2_7 python3_5 (-pypy) -python3_4 -python3_6" 0 KiB
[nomerge       ] dev-python/guessit-2.1.4::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 
[ebuild  N     ]  dev-python/pyyaml-3.12::gentoo  USE="-examples -libyaml" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 0 KiB
[nomerge       ] media-video/subliminal-2.0.5-r1::gentoo  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4" 
[ebuild  N     ]  dev-python/appdirs-1.4.3::gentoo  PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6" 0 KiB
[ebuild  N     ]  dev-python/rarfile-3.0::gentoo  USE="compressed" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
Comment 6 Alejandro 2018-04-18 19:40:25 UTC
(In reply to Michał Górny from comment #4)
> What is the version of flake8?  The deps in ebuild look fine at a first
> glance.

Eix is giving me this:

Available versions:  2.1.0 2.2.5 2.5.4 3.5.0
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-18 20:55:02 UTC
I'm asking about 'Installed versions'.
Comment 8 Alejandro 2018-04-18 20:56:38 UTC
(In reply to Michał Górny from comment #7)
> I'm asking about 'Installed versions'.

Its not installed.
Comment 9 Alejandro 2018-04-18 21:31:09 UTC
(In reply to Michał Górny from comment #7)
> I'm asking about 'Installed versions'.

It worked now, it seems flake8 was installed via pip install, I removed it with pip uninstall and tried to re emerge subliminal. All worked as expected.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-19 04:39:46 UTC
Using pip as root == breaking your system.