Discussion:
it's a shame... python error over error
Add Reply
aotto1968
2024-12-13 10:36:01 UTC
Reply
Permalink
it's a shame...
almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python
installation __isn't__ properly "understood".

-> I think after ~30 years *python* should be able to handle a shared-library proper __or__ switch to a *static-build* by default.

-> example here is the "mono-build" with the following installation.

make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird betreten
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
make[2]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird betreten
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
make[2]: Für das Ziel „install-exec-am“ ist nichts zu tun.
make[2]: Für das Ziel „install-data-am“ ist nichts zu tun.
make[2]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird verlassen
make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird verlassen
[debug]***@linux02:~/src/mono.git> ldd HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3
linux-vdso.so.1 (0x00007ffd18e9a000)
libpython3.12d.so.1.0 => HOME/ext/x86_64-suse-linux-gnu/debug/lib64/libpython3.12d.so.1.0 (0x00007f9c5d374000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9c5d350000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9c5d349000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f9c5d345000)
libm.so.6 => /lib64/libm.so.6 (0x00007f9c5d1f9000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9c5d002000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9c5dab4000)
aotto1968
2024-12-13 10:44:00 UTC
Reply
Permalink
Post by aotto1968
it's a shame...
almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python
installation __isn't__ properly "understood".
-> I think after ~30 years *python* should be able to handle a shared-library proper __or__ switch to a *static-build* by default.
-> example here is the "mono-build" with the following installation.
1. The build is done with my user and the installation is done as root.
2. The setup proper find *my* python3 because my PATH etc is setup well.
3. root is an other environment and root does *not* have my environment.
4. root uses *my* python3 without *my* environment and is *not* able to find
*my* libpython3.12d.so.1.0
5. obviously the *python3* is *not* able to create the right environment from
the installation directory of the *python3* executable.
aotto1968
2024-12-13 10:49:11 UTC
Reply
Permalink
Post by aotto1968
Post by aotto1968
it's a shame...
almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python
installation __isn't__ properly "understood".
-> I think after ~30 years *python* should be able to handle a shared-library proper __or__ switch to a *static-build* by
default.
-> example here is the "mono-build" with the following installation.
1. The build is done with my user and the installation is done as root.
2. The setup proper find *my* python3 because my PATH etc is setup well.
3. root is an other environment and root does *not* have my environment.
4. root uses *my* python3 without *my* environment and is *not* able to find
   *my* libpython3.12d.so.1.0
5. obviously the *python3* is *not* able to create the right environment from
  the installation directory of the *python3* executable.
even the `sudo -E make install` with "-E, --preserve-env" does help.
Barry
2024-12-13 18:24:29 UTC
Reply
Permalink
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open shared object file: No such file or directory
This is a debug build?

Try setting LD_LIBRARY_PATH to point at the folder that contains the .so.
Test with `ldd python3` which will show which .so libs python3 needs and if they are found.

This is what I see on Fedora 41 as an example of the output.

$ ldd /usr/bin/python3
linux-vdso.so.1 (0x0000ffffb8515000)
libpython3.13.so.1.0 => /lib64/libpython3.13.so.1.0 (0x0000ffffb7ea0000)
libc.so.6 => /lib64/libc.so.6 (0x0000ffffb7cd0000)
libm.so.6 => /lib64/libm.so.6 (0x0000ffffb7c20000)
/lib/ld-linux-aarch64.so.1 (0x0000ffffb84d0000)

Barry
aotto1968
2024-12-13 20:56:54 UTC
Reply
Permalink
Post by Barry
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open shared object file: No such file or directory
This is a debug build?
Try setting LD_LIBRARY_PATH to point at the folder that contains the .so.
Test with `ldd python3` which will show which .so libs python3 needs and if they are found.
This is what I see on Fedora 41 as an example of the output.
$ ldd /usr/bin/python3
linux-vdso.so.1 (0x0000ffffb8515000)
libpython3.13.so.1.0 => /lib64/libpython3.13.so.1.0 (0x0000ffffb7ea0000)
libc.so.6 => /lib64/libc.so.6 (0x0000ffffb7cd0000)
libm.so.6 => /lib64/libm.so.6 (0x0000ffffb7c20000)
/lib/ld-linux-aarch64.so.1 (0x0000ffffb84d0000)
Barry
the problem is *not* to setup an environment variable, the problem is that python is *not*
able to setup the *python* environment by it self.
Michael Torrie
2024-12-14 15:27:29 UTC
Reply
Permalink
Post by aotto1968
the problem is *not* to setup an environment variable, the problem is that python is *not*
able to setup the *python* environment by it self.
You're mistaken in this case. Nothing you've posted indicates the
problem is in Python itself. Something isn't quite right with your
linker and the linker search paths. LD_LIBRARY_PATH is one way to force
the linker to use the correct search path.

Python has no direct influence over the linker search paths, other than
to list what shared libraries it is linked against, or to manually add
paths to the linker in /etc/ld.so.conf.d/ during package installation.
The ld.so linker is responsible for finding the files and linking them
in, not Python. In your case it seems unable to do so, for whatever
reason. Since your custom version of python3 does seem to link to the so
properly, it seems as though something isn't right in the environment of
the mono build process. Again, nothing to do with Python. The linker
isn't even getting to the bit where it links in libpython3.
Peter J. Holzer
2024-12-14 09:56:57 UTC
Reply
Permalink
Post by aotto1968
it's a shame...
almost every tool I touch that uses "python" in some way has some
configuration error because apparently a __private__ python installation
__isn't__ properly "understood".
-> I think after ~30 years *python* should be able to handle a shared-library proper __or__ switch to a *static-build* by default.
-> example here is the "mono-build" with the following installation.
make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird betreten
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared
libraries: libpython3.12d.so.1.0: cannot open shared object file: No such
file or directory
What is HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3 and why is
HOME/src/mono.git/acceptance-tests trying to use it?

[...]
Post by aotto1968
make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird verlassen
linux-vdso.so.1 (0x00007ffd18e9a000)
libpython3.12d.so.1.0 => HOME/ext/x86_64-suse-linux-gnu/debug/lib64/libpython3.12d.so.1.0 (0x00007f9c5d374000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9c5d350000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9c5d349000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f9c5d345000)
libm.so.6 => /lib64/libm.so.6 (0x00007f9c5d1f9000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9c5d002000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9c5dab4000)
So HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3 does find
HOME/ext/x86_64-suse-linux-gnu/debug/lib64/libpython3.12d.so.1.0 if you
invoke it from the shell (to confirm that, try actually invoking it
instead of running ldd on it), but not when it's called from whatever
make is doing in the acceptance-tests directory.

So it might be because it's in a different directory ("HOME/ext/..." is
a relative path. That will not work in a different directory. Also
"HOME" is a strange choice for a directory name. Did you mean $HOME?) or
because the acceptance tests set up their own environment.

I'd test the first idea first. Cd into
HOME/src/mono.git/acceptance-tests and try to invoke
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3 there.

hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | ***@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
aotto1968
2024-12-14 17:31:22 UTC
Reply
Permalink
Post by Peter J. Holzer
Post by aotto1968
it's a shame...
almost every tool I touch that uses "python" in some way has some
configuration error because apparently a __private__ python installation
__isn't__ properly "understood".
-> I think after ~30 years *python* should be able to handle a shared-library proper __or__ switch to a *static-build* by default.
-> example here is the "mono-build" with the following installation.
make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird betreten
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared
libraries: libpython3.12d.so.1.0: cannot open shared object file: No such
file or directory
What is HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3 and why is
HOME/src/mono.git/acceptance-tests trying to use it?
[...]
Post by aotto1968
make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird verlassen
linux-vdso.so.1 (0x00007ffd18e9a000)
libpython3.12d.so.1.0 => HOME/ext/x86_64-suse-linux-gnu/debug/lib64/libpython3.12d.so.1.0 (0x00007f9c5d374000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9c5d350000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9c5d349000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f9c5d345000)
libm.so.6 => /lib64/libm.so.6 (0x00007f9c5d1f9000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9c5d002000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9c5dab4000)
So HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3 does find
HOME/ext/x86_64-suse-linux-gnu/debug/lib64/libpython3.12d.so.1.0 if you
invoke it from the shell (to confirm that, try actually invoking it
instead of running ldd on it), but not when it's called from whatever
make is doing in the acceptance-tests directory.
So it might be because it's in a different directory ("HOME/ext/..." is
a relative path. That will not work in a different directory. Also
"HOME" is a strange choice for a directory name. Did you mean $HOME?) or
because the acceptance tests set up their own environment.
I'd test the first idea first. Cd into
HOME/src/mono.git/acceptance-tests and try to invoke
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3 there.
hp
The CORE problem is that python3 works well in *my* environment but the
installation is done as root and root does not use *my* environment.

the mono build search for a working python3 and find *my*
Post by Peter J. Holzer
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3
The build is fine but after switch to root for installation
Post by Peter J. Holzer
sudo make install
the root user call *my* python3 and fail.
Chris Angelico
2024-12-14 19:12:33 UTC
Reply
Permalink
On Sun, 15 Dec 2024 at 06:05, aotto1968 via Python-list
Post by aotto1968
The CORE problem is that python3 works well in *my* environment but the
installation is done as root and root does not use *my* environment.
So, it's an environment problem, NOT a Python problem. You messed up
your installation. Start over, rebuild.

ChrisA
Michael Torrie
2024-12-15 05:21:20 UTC
Reply
Permalink
Post by aotto1968
The CORE problem is that python3 works well in *my* environment but the
installation is done as root and root does not use *my* environment.
the mono build search for a working python3 and find *my*
Post by aotto1968
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3
The build is fine but after switch to root for installation
Post by aotto1968
sudo make install
the root user call *my* python3 and fail.
mono build is failing even before you get to running your python3.
That's not something python developers can fix.
Michael Torrie
2024-12-14 15:30:19 UTC
Reply
Permalink
Post by Peter J. Holzer
So it might be because it's in a different directory ("HOME/ext/..." is
a relative path. That will not work in a different directory. Also
"HOME" is a strange choice for a directory name. Did you mean $HOME?) or
because the acceptance tests set up their own environment.
I'd test the first idea first. Cd into
HOME/src/mono.git/acceptance-tests and try to invoke
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3 there.
Indeed something is not right with his ld.so search paths. The original
error report indicates the linker cannot even find the libpython so
file, so this cannot be a problem with Python since the linker hasn't
even found it. I don't see how he expects python to fix this
configuration issue magically for mono's build scripts.
aotto1968
2024-12-16 07:08:46 UTC
Reply
Permalink
Post by aotto1968
it's a shame...
almost every tool I touch that uses "python" in some way has some configuration error because apparently a __private__ python
installation __isn't__ properly "understood".
-> I think after ~30 years *python* should be able to handle a shared-library proper __or__ switch to a *static-build* by default.
-> example here is the "mono-build" with the following installation.
make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird betreten
HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared libraries: libpython3.12d.so.1.0: cannot open
shared object file: No such file or directory
make[2]: Für das Ziel „install-exec-am“ ist nichts zu tun.
make[2]: Für das Ziel „install-data-am“ ist nichts zu tun.
make[2]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird verlassen
make[1]: Verzeichnis „HOME/src/mono.git/acceptance-tests“ wird verlassen
        linux-vdso.so.1 (0x00007ffd18e9a000)
        libpython3.12d.so.1.0 => HOME/ext/x86_64-suse-linux-gnu/debug/lib64/libpython3.12d.so.1.0 (0x00007f9c5d374000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9c5d350000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f9c5d349000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00007f9c5d345000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f9c5d1f9000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f9c5d002000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9c5dab4000)
If I read the answers I come to the conclusion that the "supporters" at python doesn't ever understand the problem.
Peter J. Holzer
2024-12-16 15:30:53 UTC
Reply
Permalink
Post by aotto1968
Post by aotto1968
it's a shame...
almost every tool I touch that uses "python" in some way has some
configuration error because apparently a __private__ python installation
__isn't__ properly "understood".
[...]
Post by aotto1968
If I read the answers I come to the conclusion that the "supporters" at python
We are not "the supporters at python". None of us is paid for doing
support. Most of us are just users of Python discussing the language and
helping each other when we can (some of us are also contributors to
Python).
Post by aotto1968
doesn't ever understand the problem.
Quite possibly, but in that case you haven't explained it well enough.

hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | ***@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Grant Edwards
2024-12-16 19:06:56 UTC
Reply
Permalink
Post by aotto1968
If I read the answers I come to the conclusion that the "supporters"
at python doesn't ever understand the problem.
You should definitely demand to speak to the manager and request your
money back.

--
Grant
Michael Torrie
2024-12-18 04:30:06 UTC
Reply
Permalink
Post by aotto1968
If I read the answers I come to the conclusion that the "supporters" at python doesn't ever understand the problem.
Sorry you feel that way. Various people gave the best advice they could
based on what you had provided. You were given some good advice and
even a few very specific things to try to determine the root problem
which you don't seem to have done. I've used linux for 30 years and
I've never seen a relative path used for a linker search path. What
provided this path to the linker?
aotto1968
2024-12-25 11:05:18 UTC
Reply
Permalink
I get angry…

next python error…

1) The OpenSUSE command "cnf" checks if a special package feature is installed.
2) I recently compiled **my** SQLite3 library specifically tailored to **my** requirement and installed it in **my** SQLite3
project directory and never changed the OpenSUSE installation.
3) "cnf" seems to use "Python" internally, but is **not** able to configure the *Python* environment to use only "OpenSUSE"'s
own "Python" and "Sqlite3" software.
4) Now the "cnf" fails with "Python" which apparently tries to use **my** SQLite3.
what a shame.
cnf jmc
Traceback (most recent call last):
File "/usr/bin/cnf", line 9, in <module>
import scout
File "/usr/lib/python3.6/site-packages/scout/__init__.py", line 10, in <module>
import sqlite3
File "/usr/lib64/python3.6/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/lib64/python3.6/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: /usr/lib64/python3.6/lib-dynload/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined symbol: sqlite3_trace
aotto1968
2024-12-25 11:20:52 UTC
Reply
Permalink
Post by aotto1968
I get angry…
next python error…
1) The OpenSUSE command "cnf" checks if a special package feature is installed.
2) I recently compiled **my** SQLite3 library specifically tailored to **my** requirement and installed it in **my** SQLite3
project directory and never changed the OpenSUSE installation.
3) "cnf" seems to use "Python" internally, but is **not** able to configure the *Python* environment to use only "OpenSUSE"'s
own "Python" and "Sqlite3" software.
4) Now the "cnf" fails with "Python" which apparently tries to use **my** SQLite3.
what a shame.
cnf jmc
  File "/usr/bin/cnf", line 9, in <module>
    import scout
  File "/usr/lib/python3.6/site-packages/scout/__init__.py", line 10, in <module>
    import sqlite3
  File "/usr/lib64/python3.6/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/lib64/python3.6/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ImportError: /usr/lib64/python3.6/lib-dynload/_sqlite3.cpython-36m-x86_64-linux-gnu.so: undefined symbol: sqlite3_trace
It is not only an *usage* error it is also an *security* error because:

1) "cnf" is using OS python
Post by aotto1968
head /usr/bin/cnf
#!/usr/bin/python3

import gettext
import os
...

2) os "root" python
Post by aotto1968
ls -al /usr/bin/python3
lrwxrwxrwx 1 root root 9 2. Dez 13:16 /usr/bin/python3 -> python3.6
Post by aotto1968
ls -al /usr/bin/python3.6
-rwxr-xr-x 2 root root 10560 2. Dez 13:16 /usr/bin/python3.6

3) using **my** local non-root library
Post by aotto1968
ls -al NHI1_EXT/lib64/libsqlite3.so.0
lrwxrwxrwx 1 dev1usr users 19 23. Dez 22:09 NHI1_EXT/lib64/libsqlite3.so.0 -> libsqlite3.so.0.8.6
Post by aotto1968
ls -al NHI1_EXT/lib64/libsqlite3.so.0.8.6
-rwxr-xr-x 1 dev1usr users 3851872 23. Dez 22:09 NHI1_EXT/lib64/libsqlite3.so.0.8.6
Chris Angelico
2024-12-25 22:55:30 UTC
Reply
Permalink
On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list
Post by aotto1968
1) "cnf" is using OS python
2) os "root" python
3) using **my** local non-root library
Yes. And YOU were the one who installed a new root Python. This is a
feature. You have the power to update Python on your system.

You managed to make a build of Python that attempts to link to a DLL
using a relative path. That's a fault of the build that means it won't
work as root. I don't understand the confusion here; isn't the
solution here to build a new version with an absolute path, and update
your installation?

ChrisA
aotto1968
2024-12-26 07:34:43 UTC
Reply
Permalink
Post by Chris Angelico
On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list
Post by aotto1968
1) "cnf" is using OS python
2) os "root" python
3) using **my** local non-root library
Yes. And YOU were the one who installed a new root Python. This is a
feature. You have the power to update Python on your system.
You managed to make a build of Python that attempts to link to a DLL
using a relative path. That's a fault of the build that means it won't
work as root. I don't understand the confusion here; isn't the
solution here to build a new version with an absolute path, and update
your installation?
ChrisA
sorry you don't understand the problem…
Post by Chris Angelico
You managed to make a build of Python that attempts to link to a DLL
I never touch the OpenSUSE python. the OpenSUSE python try to use my
sqalite3.
Chris Angelico
2024-12-30 06:10:18 UTC
Reply
Permalink
On Mon, 30 Dec 2024 at 15:02, aotto1968 via Python-list
Post by aotto1968
Post by Chris Angelico
You managed to make a build of Python that attempts to link to a DLL
I never touch the OpenSUSE python. the OpenSUSE python try to use my
sqalite3.
You keep saying this, but do you even know what "make install" does?

Are you capable of admitting that you were wrong, or are you going to
keep digging this hole?

ChrisA
Michael Torrie
2024-12-30 17:29:12 UTC
Reply
Permalink
Post by aotto1968
sorry you don't understand the problem…
Post by Chris Angelico
You managed to make a build of Python that attempts to link to a DLL
I never touch the OpenSUSE python. the OpenSUSE python try to use my
sqalite3.
The *only* mechanism that would cause the system python binary to try to
load modules and libraries from your local install is your environment
(environment variables).
aotto1968
2025-01-03 22:16:24 UTC
Reply
Permalink
Post by Michael Torrie
Post by aotto1968
sorry you don't understand the problem…
Post by Chris Angelico
You managed to make a build of Python that attempts to link to a DLL
I never touch the OpenSUSE python. the OpenSUSE python try to use my
sqalite3.
The *only* mechanism that would cause the system python binary to try to
load modules and libraries from your local install is your environment
(environment variables).
that is right because MY environment variable point to MY local user stuff.

The CORE problem is that OpenSUSE (Linux) python use MY env.

If I call a OS feature like "cnf" this should NOT interact with my private user stuff.

the OpenSUSE do it right because OpenSUSE use /usr/bin/python in "cnf" BUT the
python think to interact with MY env.

To make it short: The OS python will NEVER proper work if LOCAL user stuff is used.
Chris Angelico
2025-01-03 22:25:19 UTC
Reply
Permalink
On Sat, 4 Jan 2025 at 09:22, aotto1968 via Python-list
Post by aotto1968
Post by Michael Torrie
Post by aotto1968
sorry you don't understand the problem…
Post by Chris Angelico
You managed to make a build of Python that attempts to link to a DLL
I never touch the OpenSUSE python. the OpenSUSE python try to use my
sqalite3.
The *only* mechanism that would cause the system python binary to try to
load modules and libraries from your local install is your environment
(environment variables).
that is right because MY environment variable point to MY local user stuff.
The CORE problem is that OpenSUSE (Linux) python use MY env.
If I call a OS feature like "cnf" this should NOT interact with my private user stuff.
the OpenSUSE do it right because OpenSUSE use /usr/bin/python in "cnf" BUT the
python think to interact with MY env.
To make it short: The OS python will NEVER proper work if LOCAL user stuff is used.
People have tried in vain to explain this to you. You refuse to
listen. Go and argue with your OS instead of us; we're not the ones in
charge of this. Maybe if you argue enough, you'll start to understand
what "make install" does.

ChrisA
Lawrence D'Oliveiro
2025-01-03 23:17:26 UTC
Reply
Permalink
Post by aotto1968
The CORE problem is that OpenSUSE (Linux) python use MY env.
It can only do what you tell it to do.

Don’t tell it to do that, then.

Michael Torrie
2024-12-26 03:57:26 UTC
Reply
Permalink
This is Python related, but
it's not necessarily python's fault per se.
It's also a good reminder to use venv. Then there's no way of
activating your custom python with its custom sqlite3 library unless you
explicitly activate the venv.
Chris Angelico
2024-12-26 05:46:26 UTC
Reply
Permalink
On Thu, 26 Dec 2024 at 14:57, Michael Torrie via Python-list
Post by Chris Angelico
On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list
Post by aotto1968
1) "cnf" is using OS python
2) os "root" python
3) using **my** local non-root library
I think he means the cnf is using the "root" OS python in /usr/bin, but
/usr/bin/python3 is trying to import his local build of sqlite3, which
cause it to fail. I assume he would like cnf to not try to import his
local sqlite3, and instead use the normal system one. If this is the
case, then somehow his local, non-root sqlite3 library is being picked
up by the system version of python.
Right. That's exactly what would happen if he'd built Python using
absolute paths to libraries, which is the normal way to do it. And so
the solution is to rebuild Python using absolute paths to libraries.

ChrisA
aotto1968
2024-12-26 07:35:59 UTC
Reply
Permalink
Post by Chris Angelico
On Thu, 26 Dec 2024 at 14:57, Michael Torrie via Python-list
Post by Chris Angelico
On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list
Post by aotto1968
1) "cnf" is using OS python
2) os "root" python
3) using **my** local non-root library
I think he means the cnf is using the "root" OS python in /usr/bin, but
/usr/bin/python3 is trying to import his local build of sqlite3, which
cause it to fail. I assume he would like cnf to not try to import his
local sqlite3, and instead use the normal system one. If this is the
case, then somehow his local, non-root sqlite3 library is being picked
up by the system version of python.
Right. That's exactly what would happen if he'd built Python using
absolute paths to libraries, which is the normal way to do it. And so
the solution is to rebuild Python using absolute paths to libraries.
ChrisA
next I don't change the OpenSUSE python and the OpenSUSE python is using *my*
sqlite3.
aotto1968
2024-12-26 07:42:08 UTC
Reply
Permalink
Post by Chris Angelico
On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list
Post by aotto1968
1) "cnf" is using OS python
2) os "root" python
3) using **my** local non-root library
I think he means the cnf is using the "root" OS python in /usr/bin, but
/usr/bin/python3 is trying to import his local build of sqlite3, which
cause it to fail. I assume he would like cnf to not try to import his
local sqlite3, and instead use the normal system one. If this is the
case, then somehow his local, non-root sqlite3 library is being picked
up by the system version of python.
Aotto might want to run the "env" command and see if there are any
search paths that have to do with Python. I can see how this could be a
security issue. If you can figure out what's happening you might want to
open a ticket with the OpenSUSE developers. This is Python related, but
it's not necessarily python's fault per se.
Yes I using with *my* user *my* environment but never touch the *root*
environment at all.

the *root* python try to use *my* sqlite3 because *my* environment
fit to *my* needs.

/* just a reminder */

sqlite3 have a "special" (worse) setup that a change to the configuration
also change the "api" ( a sqlite_function disappear or arrive ).
If a tool like python using an extension that is linked to sqlite3 that extension
will likely FAIL is I get an OTHER sqlite3 which is NOT the one the extension
was build with.
aotto1968
2024-12-26 07:47:52 UTC
Reply
Permalink
Post by Chris Angelico
On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list
Post by aotto1968
1) "cnf" is using OS python
2) os "root" python
3) using **my** local non-root library
I think he means the cnf is using the "root" OS python in /usr/bin, but
/usr/bin/python3 is trying to import his local build of sqlite3, which
cause it to fail. I assume he would like cnf to not try to import his
local sqlite3, and instead use the normal system one. If this is the
case, then somehow his local, non-root sqlite3 library is being picked
up by the system version of python.
Aotto might want to run the "env" command and see if there are any
search paths that have to do with Python. I can see how this could be a
security issue. If you can figure out what's happening you might want to
open a ticket with the OpenSUSE developers. This is Python related, but
it's not necessarily python's fault per se.
You don't understand the problem if you think "/usr/bin/env" will solve the
problem → this will make it more worse.

A "personal" python will use a "personal" configuration and probably is *not*
build with sqlite3 support at all.

a *root* tool should never ever use/call a non *root* (personal) setup.
Michael Torrie
2024-12-26 18:33:29 UTC
Reply
Permalink
Post by Chris Angelico
Right. That's exactly what would happen if he'd built Python using
absolute paths to libraries, which is the normal way to do it. And so
the solution is to rebuild Python using absolute paths to libraries.
You're right. Definitely appears to be a pretty major mis-configuration
of his system. Not much we can do about that.
aotto1968
2024-12-27 06:46:56 UTC
Reply
Permalink
Post by Michael Torrie
Post by Chris Angelico
Right. That's exactly what would happen if he'd built Python using
absolute paths to libraries, which is the normal way to do it. And so
the solution is to rebuild Python using absolute paths to libraries.
You're right. Definitely appears to be a pretty major mis-configuration
of his system. Not much we can do about that.
no, your are wrong.

The problem is NOT that my user-account has a miss-configuration because my
user-account works pretty well…

The problem is that the *default* /usr/bin/python3 OpenSUSE installation using
parts of *my* local *user* setup.
Loading...