Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
setuptools is in python, but not recognized
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Bili Oslavi
n00b
n00b


Joined: 12 Mar 2023
Posts: 17

PostPosted: Mon Apr 22, 2024 4:40 pm    Post subject: setuptools is in python, but not recognized Reply with quote

Probably I'm missing something obvious, but ...

pip list:
setuptools 69.2.0

eselect python list
[1] python3.12
[2] python3.11 (fallback)
[3] python3.10 (fallback)

emerge sys-libs/libapparmor-3.1.4 (for docker)

checking for the setuptools Python package... no
configure: error: cannot import Python module "setuptools".
Please check your Python installation. The error was:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'

emerge --info '=sys-libs/libapparmor-3.1.4::gentoo
Portage 3.0.61 (python 3.11.8-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.38-r12, 6.6.21-gentoo x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-6.6.21-gentoo-x86_64-Intel-R-_Core-TM-_i3-2100_CPU_@_3.10GHz-with-glibc2.38
KiB Mem: 16363700 total, 7208264 free
KiB Swap: 33246204 total, 33246204 free
Timestamp of repository gentoo: Mon, 22 Apr 2024 03:30:00 +0000
Head commit of repository gentoo: 77b13398f7a6e2d0efedd5d612a3def98942f754
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p5) 2.41.0
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.1_p16-r6::gentoo
dev-build/autoconf: 2.13-r8::gentoo, 2.71-r6::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.28.3::gentoo
dev-build/libtool: 2.4.7-r4::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.3.2::gentoo
dev-java/java-config: 2.3.3-r1::gentoo
dev-lang/perl: 5.38.2-r2::gentoo
dev-lang/python: 3.10.14_p1::gentoo, 3.11.8_p1::gentoo, 3.12.3::gentoo
dev-lang/rust: 1.75.0-r1::gentoo
sys-apps/baselayout: 2.14-r2::gentoo
sys-apps/openrc: 0.54::gentoo
sys-apps/sandbox: 2.38::gentoo
sys-devel/binutils: 2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc: 13.2.1_p20240210::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/lld: 17.0.6::gentoo
sys-devel/llvm: 16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.38-r12::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-verify-metamanifest: yes
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1
sync-rsync-verify-max-age: 3

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps 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="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
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"
SHELL="/bin/bash"
USE="X acl alsa amd64 apache2 apng apparmor btrfs bzip2 cairo cgi cli container-init crypt cups dbus device-mapper dri elogind ffmpeg fortran fpm gd gdbm gentoo-vm gtk heif iconv icu imagemagick ipv6 jpeg jpeg2k libtirpc lvm motif mplayer multilib mysql mysqli ncurses nls nss ogg opengl openmp openssl overlay pam pcre pcre32 pdf php png postgres postproc qt5 readline seccomp secure-delete split-usr ssl svg test-rust text tiff unicode vhosts webp x265 xattr xml zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets 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 greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30940
Location: here

PostPosted: Mon Apr 22, 2024 4:56 pm    Post subject: Reply with quote

Did you install setuptools with pip?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21670

PostPosted: Mon Apr 22, 2024 5:05 pm    Post subject: Re: setuptools is in python, but not recognized Reply with quote

Bili Oslavi wrote:
Probably I'm missing something obvious, but ...
You are missing [code] tags, and the output of emerge --pretend --verbose dev-python/setuptools sys-libs/libapparmor.

If I were to guess, I would say that (1) you only installed setuptools via pip, not via Portage, and (2) your setuptools is not installed for the version of Python that this ebuild is using.
Back to top
View user's profile Send private message
Bili Oslavi
n00b
n00b


Joined: 12 Mar 2023
Posts: 17

PostPosted: Mon Apr 22, 2024 5:18 pm    Post subject: Reply with quote

I installed setuptools with emerge first, got the error, then tried pip. But I think you're right -
it's installing setuptools into python3_12 and the package requires it in python3_11:

emerge --pretend --verbose dev-python/setuptools sys-libs/libapparmor

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

Calculating dependencies... done!
Dependency resolution took 6.69 s (backtrack: 0/20).

[ebuild R ] dev-python/setuptools-69.2.0-r1::gentoo USE="-test" PYTHON_TARGETS="python3_11 (-pypy3) -python3_10 -python3_12" 0 KiB
[ebuild N ] sys-libs/libapparmor-3.1.4::gentoo USE="perl python -debug -doc -static-libs" PYTHON_TARGETS="python3_11 -python3_10" 0 KiB
Back to top
View user's profile Send private message
Bili Oslavi
n00b
n00b


Joined: 12 Mar 2023
Posts: 17

PostPosted: Mon Apr 22, 2024 5:27 pm    Post subject: Reply with quote

eselected python 3.11 and emerged sys-libs/libapparmor. Works fine now.

Thanks!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21670

PostPosted: Mon Apr 22, 2024 5:52 pm    Post subject: Reply with quote

This seems like a package bug, in my opinion. Your PYTHON_TARGETS were compatible for the two packages, which is what Portage checked before starting. However, the package apparently tried to use the system's eselect'd python instead of using the python chosen by PYTHON_TARGETS.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum