Bug#643782: ranger: Cannot be launched; ImportError raised

2011-12-14 Thread Jakub Wilk

Hi Raphael,

* Raphael Plasson rplas...@gmail.com, 2011-09-29, 18:06:
ranger can actually be launched normally if the link /usr/bin/python is 
changed, and point to /usr/bin/python/2.6 instead of the now default 
/usr/bin/python/2.7.


Please never ever change the /usr/bin/python symlink destination 
manually. More importantly, please don't post such ideas to BTS, because 
some people might follow such advice, breaking their systems horribly. 
(Yes, it happened it the past...) Thanks.


If you want to run a program with non-standard Python version, this 
should do the trick most of the time:


python2.6 /usr/bin/ranger

--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#643782: ranger: Cannot be launched; ImportError raised

2011-12-14 Thread Jakub Wilk

Hi Roman,

* Roman Z. rom...@lavabit.com, 2011-11-10, 14:09:
ranger can't run if it can't find the ranger python module. It must 
be in one of the PYTHONPATH directories.  On my install, ranger was 
installed to /usr/share/pyshared


Which is completely normal.


which is not in PYTHONPATH so ranger will not find it.


It would be a task for postinst script to make them appear there. (But 
the package was broken, and was explicitly declaring that is supports 
only 2.6, so it didn't work.)


It ought to be put at /usr/lib/pythonX/dist-packages/ instead with X 
being your python version.


To fix this, create a link from the place ranger was installed to some 
place in your PYTHONPATH, for example:


ln -s /usr/share/pyshared/ranger /usr/lib/python2.7/dist-packages/ranger


Do not ever do this. More importantly, do not post such ideas to the 
BTS, because some people might follow your advice, breaking their 
systems horribly in a way that is very hard to debug. (Yes, it happened 
in the past...) Thanks.


[...]

ImportError: No module named gui.defaultui

This is caused due to removal of the empty file 
ranger/gui/__init__.py, which is required for python to recognize 
that this directory is a python module.


Lack of __init__.py files in /usr/share/pyshared is also completely 
normal.


--
Jakub Wilk



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#643782: ranger: Cannot be launched; ImportError raised

2011-11-10 Thread Roman Z.
Dear fellows,

ranger can't run if it can't find the ranger python module.  It must
be in one of the PYTHONPATH directories.  On my install, ranger was
installed to /usr/share/pyshared which is not in PYTHONPATH so ranger
will not find it.  It ought to be put at /usr/lib/pythonX/dist-packages/
instead with X being your python version.

To fix this, create a link from the place ranger was installed to some
place in your PYTHONPATH, for example:

ln -s /usr/share/pyshared/ranger /usr/lib/python2.7/dist-packages/ranger


To determine where ranger was installed, run:
  dpkg --listfiles ranger | grep fm.py | grep -o .\*ranger

To determine where you can put ranger so it works, run:
  python -c 'import sys; print(\n.join(sys.path))'


I noticed this additional bug: 

Traceback (most recent call last):
  File /usr/bin/ranger, line 59, in module
sys.exit(ranger.main())
  File /usr/lib/python2.7/dist-packages/ranger/core/main.py, line 29, in main
from ranger.core.fm import FM
  File /usr/lib/python2.7/dist-packages/ranger/core/fm.py, line 30, in 
module
from ranger.gui.defaultui import DefaultUI
ImportError: No module named gui.defaultui

This is caused due to removal of the empty file ranger/gui/__init__.py,
which is required for python to recognize that this directory is a
python module.  If this occurs for you, run:

touch /usr/lib/python2.7/dist-packages/ranger/gui/__init__.py

(replace /usr/lib/python2.7/dist-packages/ with whatever directory
ranger was installed to.)

Raphael Plasson wrote:
 I however do not know where the incompatibility is coming from...
ranger is usually installed for one particular python version (although
being compatible with all python versions since 2.6)  because Python 2.7
does NOT look for modules in /usr/lib/python2.6.  As a result, you need
to reinstall ranger when you update python.


Regards,
Roman




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#643782: ranger: Cannot be launched; ImportError raised

2011-10-10 Thread Steve B
Hello,

I can reproduce the bug.

Linking python to python2.6 instead of python2.7 works indeed.


Cheers,

--
Steve


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ranger depends on:
ii  file5.08-1 
ii  less444-1  
ii  python  2.7.2-8
ii  python-support  1.0.14 

ranger recommends no packages.

Versions of packages ranger suggests:
pn  atoolnone
pn  caca-utils   none
pn  elinks-lite  none
pn  highlightnone

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#643782: ranger: Cannot be launched; ImportError raised

2011-09-29 Thread Raphael Plasson
Package: ranger
Version: 1.4.3-1
Severity: grave
Justification: renders package unusable

Hello,

ranger cannot be launched since the default python switched from 2.6 to
2.7. After the python upgrade, calling ranger in commandline gives:

Traceback (most recent call last):
  File /usr/bin/ranger, line 58, in module
  import ranger
ImportError: No module named ranger

ranger can actually be launched normally if the link /usr/bin/python is
changed, and point to /usr/bin/python/2.6 instead of the now default
/usr/bin/python/2.7. I however do not know where the incompatibility is
coming from...

Regards,

Raphael



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ranger depends on:
ii  file5.08-1
ii  less444-1
ii  python  2.7.2-7
ii  python-support  1.0.14

ranger recommends no packages.

Versions of packages ranger suggests:
ii  atool0.38.0-1
ii  caca-utils   0.99.beta17-2.1
ii  elinks-lite  0.12~pre5-4
ii  highlight3.5-3

-- no debconf information




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org