Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Switch to python2 for hplip?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Wed Feb 19, 2014 5:26 pm    Post subject: Switch to python2 for hplip? Reply with quote

I'm trying to set up an HP MFD with hp-setup and I've come across the error described here:

https://wiki.gentoo.org/wiki/HPLIP#Error_on_install_.22File_.22..2Fplugin_install.py.22.2C_line_78_except_ImportError.2C_e:.22

The solution is to use eselect python to switch from python-3.3 to python-2.7 but that seems like a large system-wide change to make for only this. I wouldn't be surprised if that breaks something else. Shouldn't hplip use python-2.7 automatically? Isn't that the point of having both versions installed?
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Thu Feb 20, 2014 12:54 am    Post subject: Reply with quote

Code:
head /usr/bin/hp-systray -n1
#!/usr/bin/env python2.7


you shouldn't have to change the default python since the shebang calls for py27 & gentoo has a cfile to pass the shebang on to the correct interpreter
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Feb 20, 2014 1:41 pm    Post subject: Reply with quote

Doesn't the wiki link above contradict that? I've found the same thing and eselect python did fix it.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Feb 20, 2014 2:01 pm    Post subject: Reply with quote

Then fix the wiki ;)

First line should probably be:
Code:
#!/usr/bin/env python2

Or:
Code:
#!/usr/bin/env python2.7


Arch Linux uses nasty SEDs in hplip pkg.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Feb 20, 2014 8:13 pm    Post subject: Reply with quote

I'm confused. The first line of /usr/bin/hp-systray? It is already:

Code:
#!/usr/bin/env python2.7


The same goes for /usr/bin/hp-plugin. /usr/bin/hp-setup starts with:

Code:
#!/usr/bin/python2.7
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum