You are not logged in.
I run across a weird issue with python and python2 installed via pacman.
python2 works fine but python (or python3) ignores all commandline arguments except for filenames and opens the python2.7 shell.
Trying to execute a script using ./somescript.py just prints:
/: can't find '__main__' module in '.'I tried reinstalling both packages and I also tried removing them using pacman -Rdd and installing only one of them.
When I only have python (python3) installed it opens the correct shell and accepts commandline arguments but prints:
ERROR: ld.so: object '/usr/lib64/libpython2.7.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.running ldd /usr/bin/python3 gives me the following output:
$ ldd /usr/bin/python3
linux-vdso.so.1 (0x00007fff7f584000)
/usr/lib64/libpython2.7.so (0x00007fcf3c0fc000)
libpython3.5m.so.1.0 => /usr/lib/libpython3.5m.so.1.0 (0x00007fcf3bc2e000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fcf3ba11000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fcf3b673000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fcf3b46f000)
libutil.so.1 => /usr/lib/libutil.so.1 (0x00007fcf3b26c000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fcf3af68000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcf3c4e6000)Any help is appreciated.
Last edited by Sensibility (2017-01-05 11:12:41)
Offline
What's the output of
$ type python
$ type python3
$ which python
$ which python3Offline
$ type python
python is hashed (/usr/bin/python)
$ type python3
python3 is hashed (/usr/bin/python3)
$ which python
/usr/bin/python
$ which python3
/usr/bin/python3It might also be worth mentioning that calling /usr/bin/python3.5 directly gives me the same result as described above
Last edited by Sensibility (2017-01-05 10:56:28)
Offline
What is the output of
$ printenv LD_PRELOADOffline
Only
/usr/lib64/libpython2.7.soOffline
If you unset LD_PRELOAD then run the commands again is the result the same?
Offline
Seems like that was enough to fix it. I'll keep that in mind if I come across a similar issue. Thanks for your help.
Offline