Portál AbcLinuxu, 10. května 2025 07:34
Nastavuji balík python-pkg-resources (0.6c8-4) ...
Traceback (most recent call last):
File "/usr/bin/pycentral", line 1891, in ?
main()
File "/usr/bin/pycentral", line 1885, in main
rv = action.run(global_options)
File "/usr/bin/pycentral", line 1239, in run
runtimes = get_installed_runtimes()
File "/usr/bin/pycentral", line 210, in get_installed_runtimes
default_version = pyversions.default_version(version_only=True)
File "/usr/share/pycentral-data/pyversions.py", line 163, in default_version
raise ValueError, "/usr/bin/python does not match the python default version. It must be reset to point to %s" % debian_default
ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.5
dpkg: chyba při zpracovávání python-pkg-resources (--configure):
podproces post-installation script vrátil chybový status 1
Při zpracování nastaly chyby:
python-pkg-resources
Log ended: 2010-07-10 01:00:57
Netušíte, jak se toho zbavit ? Teď nemůžu ani aktualizovat, ani odebírat, ani instalovat :( THX.
Řešení dotazu:
Zdravim. V terminaly zadaj nasledovne:
/usr/bin/python -c 'import sys; print sys.version[:3]'
a nasledne toto:
ls -l "$(which python)"
Ak sa nezhoduju, co je vlastne dovod tej chyby, treba to nalinkovat nasledovne ako root:
rm /usr/bin/python && ln -s "$(which python"$(/usr/bin/python -c 'import sys; print sys.version[:3]')")" /usr/bin/python
alebo si jednoducho pozri, co ti vratil prvy prikaz v prispevku a nalinkuj si to takto:
rm /usr/bin/python && ln -s /usr/bin/python_co_ti_vratil_prvy_prikaz /usr/bin/python
Som sa hrabal v tych skriptoch, zabil trocha casu, priucil sa a tak budem rad, ak das vediet, ci pomohlo. Zatial.
Oprava:
rm /usr/bin/python && ln -s "$(which python"$(/usr/bin/python -c 'import sys; print sys.version[:3]')")" /usr/bin/python
je to hlupost. Prv vymazem a neskor to volam. Co uz :D
To druhe vsak funguje urcite.
server:~# /usr/bin/python -c 'import sys; print sys.version[:3]'
2.4
server:~# ls -l "$(which python)"
lrwxrwxrwx 1 root root 9 18. kvě 21.34 /usr/bin/python -> python2.4
(rm /usr/bin/python; ln -s /usr/bin/python2.5 /usr/bin/python;)
Ani sa necudujem popravde, to vsetko, co som popisal nebolo spravne vydedukovane. Je to totiz inak, vid toto:
The set of currently supported python versions can be found in
/usr/share/python/debian_defaults
. This file is in Python ConfigParser format and defines four variables in its DEFAULT section: default-version which is the current default Python runtime, supported-versions which is the set of runtimes currently supported and for which modules should be built and byte-compiled, old-versions which is the list of runtimes which might still be on the system but for which should not be built anymore, and unsupported-versions which is the list of runtimes which should not be supported at all, that is modules should not be built or byte-compiled for these. The supported interface to this file is/usr/bin/pyversions
. The Python 3 interface is through/usr/bin/py3versions
.
http://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html
Malo by stacit pozriet teda ten subor /usr/share/python/debian_defaults
cat /usr/share/python/debian_defaults
Takze podla vsetkeho, tam najdes presne to, na aku verziu python-u musi odkazovat /usr/bin/python , ak tomu uz konecne spravne chapem.
Takze este raz pardon, ze som tuto temu domrvil nespravnymi domnienkami. ;)
Kazdopadne som rad, ze ti to uz ide a mozes pokracovat vo vyvoji ;)
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.