You are not logged in.
@jiyunatori
This is a python 2.6->2.7 issue. Just delete your matplotlib font cache (~/.matplotlib/fontList.cache) and a new one will be generated when you plot something.
Offline
broken firefox in abs. Complaining about syntax (.py file).
/usr/bin/python ../toolkit/xre/make-platformini.py --print-buildid > buildid
File "../toolkit/xre/make-platformini.py", line 17
print datetime.now().strftime('%Y%m%d%H%M%S')
^
SyntaxError: invalid syntax
make[4]: *** [export] Error 1
that's pretty simple to fix and it would available in the next firefox update.
cat python2.7.patch
--- configure.in 2010-10-12 10:44:37.000000000 -0700
+++ configure.in~ 2010-10-19 09:51:49.660019364 -0700
@@ -811,7 +811,7 @@
AC_MSG_RESULT([yes])
fi
-MOZ_PATH_PROGS(PYTHON, $PYTHON python2.5 python2.4 python)
+MOZ_PATH_PROGS(PYTHON, $PYTHON python2.7 python2.5 python2.4 python)
if test -z "$PYTHON"; then
AC_MSG_ERROR([python was not found in \$PATH])
fi
Give what you have. To someone, it may be better than you dare to think.
Offline
also extra/twisted is broken, I use it through aur/btpd-webui-cvs
$ btpd-webui start
Starting btpd-webui via twistd...Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 626, in run
runApp(config)
File "/usr/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 374, in run
self.application = self.createOrGetApplication()
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 439, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- <exception caught here> ---
File "/usr/lib/python2.7/site-packages/twisted/application/app.py", line 450, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/lib/python2.7/site-packages/twisted/application/service.py", line 390, in loadApplication
application = sob.loadValueFromFile(filename, 'application', passphrase)
File "/usr/lib/python2.7/site-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
exec fileObj in d, d
File "/usr/bin/btpd-webui-server", line 24, in <module>
from btpdwebui import config, webui
exceptions.ImportError: No module named btpdwebui
Failed to load application: No module named btpdwebui
Failed
$ find /usr/lib/python* -iname "*btpdwebui*"
/usr/lib/python3.1/site-packages/btpdwebui
Last edited by c00kiemon5ter (2010-10-19 18:22:32)
.:[ git me! ] :.
Offline
@c00kiemon5ter nope. your btpd-webui-cvs is broken.
Give what you have. To someone, it may be better than you dare to think.
Offline
@wonder yep fix'd
the new PKGBUILD , edited the 'depends' var and the setup.py instruction as mentioned by ioni
works well now.
$ diff old new
9c9
< depends=('python' 'twisted' 'btpd')
---
> depends=('python2' 'twisted' 'btpd')
33c33
< python setup.py install --root=${pkgdir}
---
> python2 setup.py install --root=${pkgdir}
# Contributor: Vajdics Balázs <b.vajdics@gmail.com>
pkgname=btpd-webui-cvs
pkgver=16
pkgrel=1
pkgdesc="A simple webui for the Bittorrent Protocol Daemon"
arch=('i686' 'x86_64')
url="http://code.google.com/p/btpd-webui/"
depends=('python2' 'twisted' 'btpd')
makedepends=('subversion')
source=()
license=('GPL')
md5sums=()
_svntrunk=http://btpd-webui.googlecode.com/svn/trunk
_svnmod=btpd-webui-read-only
build() {
cd $startdir/src
if [ -d $_svnmod/.svn ]; then
(cd $_svnmod && svn up -r $pkgver)
else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
fi
msg "SVN checkout done or server timeout"
msg "Starting make..."
cp -r $_svnmod $_svnmod-build
cd $_svnmod-build
python2 setup.py install --root=${pkgdir}
rm -rf $startdir/src/$_svnmod-build
}
Last edited by c00kiemon5ter (2010-10-19 18:30:15)
.:[ git me! ] :.
Offline
broken firefox in abs. Complaining about syntax (.py file).
/usr/bin/python ../toolkit/xre/make-platformini.py --print-buildid > buildid
File "../toolkit/xre/make-platformini.py", line 17
print datetime.now().strftime('%Y%m%d%H%M%S')
^
SyntaxError: invalid syntax
make[4]: *** [export] Error 1
Try my script:
This script switches between /usr/bin/python2 and /usr/bin/python (python3) in this "transition-phase", for example if you need to build chromium-dev (it needs python2).
#!/bin/bash
if [ `whoami` != "root" ]
then
echo "Please run as root!"
exit 1
fi
if ! [ -f /opt/pyswitch/pp ]
then
# Create python backup directory
mkdir -p /opt/pyswitch/
# Get current Python location
PP=`which python`
# Save old destination to file pp in backup dir
echo -ne $PP > /opt/pyswitch/pp
# Move python to backup destination
mv $PP /opt/pyswitch/python.bak
# Make symlink to python2
ln -s `which python2` $PP
echo "$PP is now python2"
else
# Get old Path
PP=`cat /opt/pyswitch/pp`
# Remove the file
rm /opt/pyswitch/pp
# Remove symlink
rm $PP
# mv python3 back
mv /opt/pyswitch/python.bak $PP
echo "$PP is now python3"
fi
Last edited by akurei (2010-10-19 19:21:46)
Offline
The upgrade went much smoother than I expected. I just have a few problems with some packages from AUR, but I have faith those issues will be sorted out soon.
Offline
extra/denyhosts is broken:
https://bugs.archlinux.org/task/21347
And some other AUR packages: wacom related, dockbarx crashes. The latter might be caused by other updates, since there is a report that it works for one user.
--
Milan Knizek
http://knizek.net
Offline
I have an AUR package chipmunk-radio, which depends on dbus-python, pygtkhelpers-hg and pylast.
The chipmunk-radio code is itself python3-friendly.
The dbus-python package installs a module for python2 only.
The pygtkhelpers-hg and pylast packages install modules for python3 only.
Using easy_install for the latter two will install python2 modules for them, but that still won't work, I think because the latest release of pygtkhelpers is outdated.
So for me to get this working it looks like I need to find a way to install either a recent pygtkhelpers-python2, or dbus-python3.
Offline
Just finished updating. I had a broken panflute applet for a few days, but now it works again.
When the update was finished, Kupfer's keyboard shortcut wasn't being recognized, but reinstalling libkeybinder and python-keybinder did the trick.
Overall, very smooth transition, all of my AUR installed packages are working perfectly.
Offline
So far the only issue I had was having to install "python-notify" when "wicd-client-kde" from the AUR stopped functioning. Everything else has been fine. Other AUR packages included.
Offline
# rm /usr/bin/python
# ln -s /usr/bin/python2 /usr/bin/python
Sorry, but I can't stand Python 3. I'm keeping it like that until I start using Python packages that are no longer compatible with Python 2. I suspect that this won't be for quite a while.
-- jwc
http://jwcxz.com/ | blog
dotman - manage your dotfiles across multiple environments
icsy - an alarm for powernappers
Offline
I'm having a bit of trouble with flexget (http://flexget.com/)
$ svn co http://svn.flexget.com/trunk flexget-dev
#modify binding
$ nano flexget-dev/bootstrap.py
$ python2 flexget-dev/bootstrap.py
Results in lots of import errors
or attempting the .egg;
$ wget http://download.flexget.com/unstable/Fl … -py2.6.egg -p /tmp
$ sudo easy_install-2.7 /tmp/FlexGet-1.0r1532-py2.6.egg
#Generate paver-minilib.zip
#OSError: [Errno 20] Not a directory: 'paver-minilib.zip/paver/__init__.py'
any tips?
Offline
# rm /usr/bin/python # ln -s /usr/bin/python2 /usr/bin/python
Sorry, but I can't stand Python 3. I'm keeping it like that until I start using Python packages that are no longer compatible with Python 2. I suspect that this won't be for quite a while.
You're going to have fun the next time python gets updated. If you're really intent on avoiding python3, I suggest you make a simple package called nopython3 or something which conflicts with python and provides the symlink above. It will probably need to provide python as well.
As it is you still have python3 installed, so when it updates it'll overwrite your symlink.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Could someone indicate clearly how to modify a PKGBUILD with the sed command to change python -> python2?
I mean, I could experiment, but it's probably better to put clear instructions somewhere for the benefit of all.
Archer since 03/2009 - AUR packages
Offline
@foucault: thanks a bunch, it worked !
Offline
Could someone indicate clearly how to modify a PKGBUILD with the sed command to change python -> python2?
I mean, I could experiment, but it's probably better to put clear instructions somewhere for the benefit of all.
http://aur.archlinux.org/packages.php?ID=33966 (see my comment).
Only thing I had to change on my system, otherwise everything worked fine
"A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila."
(Mitch Ratcliffe)
Offline
@axel668: hum... not exactly what I was referring to. but thanks anyway for answering.
I looked it up and found an example in a PKGBUILD from flamelab. adopted it and it works.
after the make install in the PKGBUILD, add
sed -i -e "s|env python|env python2|" ${pkgdir}/path/to/the/file/to/patch
replace "env python" by "/usr/bin/python" if necessary (same for the python2 string), and change the path of course.
Archer since 03/2009 - AUR packages
Offline
This is better:
sed -i -e "s|env python$|env python2|" ${pkgdir}/path/to/the/file/to/patch
The extra "$" makes sure you do not sed resulting in things like "/usr/bin/env python22"...
Offline
This is better:
sed -i -e "s|env python$|env python2|" ${pkgdir}/path/to/the/file/to/patch
The extra "$" makes sure you do not sed resulting in things like "/usr/bin/env python22"...
and things like that "$" are the reason the fish shell is evil
Offline
The idea is that naming will eventually transform to "python-foo" being for python-3.x and "python2-foo" being for python2. However, that is not fully realised yet and would require a lot of renaming if we did it all at once so we are going to transition that slowly.
Sorry if I missed a discussion about this, but wouldn't it be more provident to use "python2-foo" and "python3-foo"? Keeping the number would prevent issues in the future (however far off they may be).
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
and things like that "$" are the reason the fish shell is evil
I dont exactly see that as evil. After all, fish points to an error, that is actually falsely suppressed by bash. Obviously one must use apostrophes if variable expansion is not desired:
sed -i -e 's|env python$|env python2|' $pkgdir/path/to/the/file/to/patch
Or am I on a wrong track here?
Last edited by SanskritFritz (2010-10-20 13:26:46)
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
This is better:
sed -i -e "s|env python$|env python2|" ${pkgdir}/path/to/the/file/to/patch
The extra "$" makes sure you do not sed resulting in things like "/usr/bin/env python22"...
Sorry, but what is the -e switch doing there? The man sed page says
-e script, --expression=script
add the script to the commands to be executed
This is greek to me.
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
Sorry, but what is the -e switch doing there? The man sed page says
this is a bit offtopic, but sed can execute several commands with one sed invokation.
To do this you use the -e switch. eg
sed -e "s/foo/bar/" -e "s/cactus/tacos/g"
if you only do one thing, -e can be omitted
that means
sed -e "s/you/me/" # is the same as
sed "s/you/me/"
btw I am G®33κ
Last edited by c00kiemon5ter (2010-10-20 13:35:27)
.:[ git me! ] :.
Offline
SanskritFritz wrote:Sorry, but what is the -e switch doing there? The man sed page says
this is a bit offtopic, but sed can execute several commands with one sed invokation.
To do this you use the -e switch. egsed -e "s/foo/bar/" -e "s/cactus/tacos/g"
if you only do one thing, -e can be omitted
that meanssed -e "s/you/me/" # is the same as sed "s/you/me/"
btw I am G®33κ
Sorry to extend the OT, but -e is to enable multiple *scripts*, each script can have multiple commands.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline