ranger-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ranger-users] Version 1.5.0 out


From: Roman Z.
Subject: Re: [Ranger-users] Version 1.5.0 out
Date: Thu, 13 Oct 2011 20:37:04 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Oct 13, 2011 at 08:12:05PM +0200, Jostein Berntsen wrote:
> On 13.10.11,20:00, Roman Z. wrote:
> > On Thu, Oct 13, 2011 at 07:22:52PM +0200, Jostein Berntsen wrote:
> > > On 13.10.11,18:46, Roman Z. wrote:
> > > > Hi
> > > > 
> > > > > After I install ranger with "sudo make install" I get still get this:
> > > > > 
> > > > > ranger
> > > > > Can't import the main module.
> > > > > To run an uninstalled copy of ranger,
> > > > > launch ranger.py in the top directory.
> > > > > Traceback (most recent call last):
> > > > >   File "/usr/local/bin/ranger", line 52, in <module>
> > > > >     sys.exit(ranger.main())
> > > > > AttributeError: 'module' object has no attribute 'main'
> > > > > 
> > > > > I have to symlink to ranger.py in the install directory to make it 
> > > > > run. Is 
> > > > > there a way to correct this?
> > > > 
> > > > This happens when python can't find ranger's module.  When you run "sudo
> > > > make install", it should be installed properly and this should never
> > > > happen, so I dunno...
> > > > 
> > > > Can you tell me what do you mean with "install directory"?
> > > > 
> > > 
> > > The install directory is f.ex. 
> > > 
> > > ~/dw/ranger-master> ls
> > > build  CHANGELOG  COPYING  doc  INSTALL  install_log.txt  Makefile  
> > > ranger  ranger.py  README  scripts  setup.py  test
> > > 
> > 
> > Could it be that you start ranger with a specific python version?
> > Perhaps with an alias in your .bashrc?
> > Try just running /usr/local/bin/ranger directly.
> > 
> > If this works, here's the fix:  Run "sudo PYTHON=python3.2 make install"
> > to install ranger with python3.2.  Replace "python3.2" with whatever
> > python version you want ranger to use.
> > The alternative, of course, is to fix your .bashrc alias/function/whatever
> > 
> 
> I deleted the ranger reference in .bashrc, and installed it with: sudo 
> PYTHON=python2.7 make install
> 
> sudo PYTHON=python2.7 make install
> python2.7 setup.py install '--record=install_log.txt' \
>         '--root=/' --optimize=1
> running install
> running build
> running build_py
> running build_scripts
> running install_lib
> writing byte-compilation script '/tmp/tmpw08alz.py'
> /usr/bin/python2.7 -O /tmp/tmpw08alz.py
> removing /tmp/tmpw08alz.py
> running install_scripts
> changing mode of /usr/local/bin/ranger to 755
> running install_data
> running install_egg_info
> Removing /usr/local/lib/python2.7/site-packages/ranger-1.5.0-py2.7.egg-info
> Writing /usr/local/lib/python2.7/site-packages/ranger-1.5.0-py2.7.egg-info
> writing list of installed files to 'install_log.txt'
> 
> 
> but I still get the same error.
> 
> 
> Jostein
> 

Try removing these files/directories and then installing again:

sudo rm -v /usr{/local,}/bin/ranger
sudo rm -rfv /usr{/local,}/lib/python*/{site,dist}-packages/ranger

(To check what this removes, replace "sudo rm -xyz" with "ls -d")




reply via email to

[Prev in Thread] Current Thread [Next in Thread]