# Switch to python2 for hplip?

## grant123

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?

----------

## Naib

```
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

----------

## grant123

Doesn't the wiki link above contradict that?  I've found the same thing and eselect python did fix it.

----------

## PaulBredbury

Then fix the wiki  :Wink: 

First line should probably be:

```
#!/usr/bin/env python2
```

Or:

```
#!/usr/bin/env python2.7
```

Arch Linux uses nasty SEDs in hplip pkg.

----------

## grant123

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

```
#!/usr/bin/env python2.7
```

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

```
#!/usr/bin/python2.7
```

----------

