From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 175CD1382C5 for ; Sun, 7 Mar 2021 16:00:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B915E08DD; Sun, 7 Mar 2021 16:00:18 +0000 (UTC) Received: from mta1.recol.net (mta1.recol.net [64.207.103.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C827BE088B for ; Sun, 7 Mar 2021 16:00:17 +0000 (UTC) Received: from wrkhors.com (c-73-154-246-108.hsd1.pa.comcast.net [73.154.246.108]) by mta1.recol.net (Postfix) with ESMTPSA id 1A1AF398AE0; Sun, 7 Mar 2021 11:00:17 -0500 (EST) Date: Sun, 7 Mar 2021 11:00:16 -0500 From: Steven Lembark To: gentoo-user@lists.gentoo.org Cc: lembark@wrkhors.com Subject: Re: [gentoo-user] Q: What is "python-exec2c"? Why would "python3" dispatched through it not see an installed copy of pyyaml? Message-ID: <20210307110016.09c64f5a.lembark@wrkhors.com> In-Reply-To: <20210306230947.cunfmvutna7enwr2@grusum.endjinn.de> References: <20210306143810.0d17b770.lembark@wrkhors.com> <20210306230947.cunfmvutna7enwr2@grusum.endjinn.de> Organization: Workhorse Computing X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-Workhorse: Quite Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 275d9ec2-2f24-46ae-9afe-1bbeee5e5cde X-Archives-Hash: 61d4cce53f8dea9f0284bd286e67272d On Sun, 7 Mar 2021 00:09:47 +0100 David Haller wrote: > Hello, > > On Sat, 06 Mar 2021, Steven Lembark wrote: > >Question then is why "python-exec2c" dispatched via a symlink from > >"python3" would fail to see the installed copy of pyyaml (or how > >should I check with modules are avalable via "python3")? > [..] > >I think that pyyaml is installed: > > > >* dev-python/pyyaml > > Latest version available: 5.4.1 > > Latest version installed: 5.4.1 > > Size of files: 170 KiB > > Homepage: https://pyyaml.org/wiki/PyYAML > > https://pypi.org/project/PyYAML/ https://github.com/yaml/pyyaml > > Description: YAML parser and emitter for Python License: > > MIT > > Check with 'eix dev-python/pyyaml' or 'equery uses dev-python/pyyaml' > for what python versions that module is actually installed for and > compare that with the default python3 version (check 'python3 > --version') I believe there isn't any PYTHON_TARGET-ish setting on the system: $ grep PYTHON_TARGET /etc/portage/make.conf /etc/portage/package.use/* /etc/portage/make.conf:#PYTHON_TARGETS="python3_7 python2_7" /etc/portage/package.use/dizzy:#*/* PYTHON_TARGETS: python3_6 python3_7 /etc/portage/package.use/dizzy~:#*/* PYTHON_TARGETS: python3_6 python3_7 > You probably need to re-emerge dev-python/pyyaml if PYTHON_TARGETS has > changed. You probably have it installed just for one target (which is > not your current default python3). > $ equery uses dev-python/pyyaml > [..] > + + python_targets_python3_7 : Build with Python 3.7 > + + python_targets_python3_8 : Build with Python 3.8 > - - python_targets_python3_9 : Build with Python 3.9 > [..] > > So I have it installed for python 3.7.x and 3.8.x ... > > HTH, > -dnh > $ equery uses dev-python/pyyaml [ Legend : U - final flag setting for installation] [ : I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for dev-python/pyyaml-5.4.1: U I - - examples : Install examples, usually source code + + libyaml : enable support for C implementation using libyaml - - python_targets_python3_7 : Build with Python 3.7 + + python_targets_python3_8 : Build with Python 3.8 - - python_targets_python3_9 : Build with Python 3.9 - - test : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) (ins)lembark@dizzy ~ $ eselect python list Available Python interpreters, in order of preference: [1] python3.9 [2] python3.6 [3] python3.8 (fallback) [4] python3.7 (fallback) [5] python2.7 (fallback) $ python3 --version; Python 3.9.1 Q: If don't have PYTHON_TARGETS set Given that I installed it yesterday when the makefile told me about pyyaml not being installed, there aren't any TARGETS set (both commented), python3 appears to be python-3.9... Q: Why would emerge pyyaml install the pacakge for a non-target python version that isn't the one linked via python3? Q: Is this related to the fact that I'm not actually checking python but a wrapper named "python-exec2c": $ ls -l /usr/bin/python3 lrwxrwxrwx 1 root root 13 Oct 20 10:46 /usr/bin/python3 -> python-exec2c i.e., could the wrapper be mis-diagnosing the correct python version at install time? Q: Is there any reasonable way to have a single version of python installed so that I get out of this maze? Previous python target advice left me with one machine being re-installed and I'd rather not have my server disabled at this point. Thanks -- Steven Lembark Workhorse Computing lembark@wrkhors.com +1 888 359 3508