On Sun, 7 Mar 2021 00:09:47 +0100 David Haller <[email protected]> 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 [email protected] +1 888 359 3508

