FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 05-06-2012, 09:47 PM
Larry Martell
 
Default loosing applications

On Sun, May 6, 2012 at 3:45 PM, Michel Donais <donais@telupton.com> wrote:
> First trial from root
>
> [root@serveur ~]# python
> Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import libuser
>
> "no error there; so it found it's way to libuser"
>
>>>> print (sys.path)
> Traceback (most recent call last):
> *File "<stdin>", line 1, in ?
> NameError: name 'sys' is not defined
>
> "here it seem that there is no path defined

You need to import sys

>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Second trial (non-root) /usr/michel
>
> [michel@serveur ~]$ python
> Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> inport libuser

import not inport

> *File "<stdin>", line 1
> * *inport libuser
> * * * * * * * * ^
> SyntaxError: invalid syntax
>>>>
>>>>
>>>> print(sys.path)
> Traceback (most recent call last):
> *File "<stdin>", line 1, in ?
> NameError: name 'sys' is not defined
>>>>
>
>
> I think we are near a solution
>
> ---
> Michel Donais
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-06-2012, 09:51 PM
Ljubomir Ljubojevic
 
Default loosing applications

On 05/06/2012 11:45 PM, Michel Donais wrote:
> inport libuser

its: import libuser, M instead of N

--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-06-2012, 11:18 PM
"Michel Donais"
 
Default loosing applications

>From root

[root@serveur ~]# python
Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libuser
>>> print (sys.path)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'sys' is not defined
>>> import sys
>>> print (sys.path)
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
>>> import libuser
>>>

Larry Martell seem's to have the right way.
sys is not defined.

Where should I pout it to get it permanent aund use pirut under X


[root@serveur ~]# su michel

[michel@serveur root]$ python
Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libuser
>>> print (sys.path)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'sys' is not defined
>>> import sys
>>> print (sys.path)
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
>>>
>>>
[michel@serveur root]$ >>> import sys
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>> print (sys.path)
bash: syntax error near unexpected token `>'
[michel@serveur root]$
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
[michel@serveur root]$ >>> import libuser
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>>
bash: syntax error near unexpected token `>'

[michel@serveur root]$ [root@serveur ~]# su michel
[michel@serveur root]$ [michel@serveur root]$ python
bash: [michel@serveur: command not found
[michel@serveur root]$ Python 2.4.3 (#1, Feb 22 2012, 16:06:13)
bash: syntax error near unexpected token `('
[michel@serveur root]$ [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
bash: syntax error near unexpected token `('
[michel@serveur root]$ Type "help", "copyright", "credits" or "license" for
more information.
[michel@serveur root]$ >>> import libuser
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>> print (sys.path)
bash: syntax error near unexpected token `>'
[michel@serveur root]$ Traceback (most recent call last):
bash: syntax error near unexpected token `most'
[michel@serveur root]$ File "<stdin>", line 1, in ?
bash: File: command not found
[michel@serveur root]$ NameError: name 'sys' is not defined
bash: NameError:: command not found
[michel@serveur root]$ >>> import sys
bash: syntax error near unexpected token `>'
[michel@serveur root]$ >>> print (sys.path)
bash: syntax error near unexpected token `>'
[michel@serveur root]$
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']
--
Michel Donais
Donais & Fils Inc

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-07-2012, 07:47 AM
Jesus del Valle
 
Default loosing applications

>
> Larry Martell seem's to have the right way.
> sys is not defined.
>
> Where should I pout it to get it permanent aund use pirut under X
>
Hi Michel. This is only to print a sys variable; you don't need to do
anything there. So your default python finds the libuser library, the error
you saw before with import libuser is not coming from this python, at least
as root. Does it make sense to remove pirut and re-install it? I don't use
it, I have absolutely no idea which consequences it may have removing and
reinstalling pirut for software that was already installed under pirut.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-08-2012, 12:35 AM
"Michel Donais"
 
Default loosing applications

> Hi Michel. This is only to print a sys variable; you don't need to do
> anything there. So your default python finds the libuser library, the
> error
> you saw before with import libuser is not coming from this python, at
> least
> as root. Does it make sense to remove pirut and re-install it? I don't use
> it, I have absolutely no idea which consequences it may have removing and
> reinstalling pirut for software that was already installed under pirut.

It's already been done, uninstall and re-install pirut without success. The
version removed end the re-installed one were at the same level

For Centos-5.8 I've a test machine both are at the same level of update.
If I do >>>print (sys.path) on the production machine, I get

>>> import sys
>>> print (sys.path)
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages']

And on the test machine I get

>>> import sys
>>> print (sys.path)
[', '/usr/lib/python24.zip', '/usr/lib/python2.4',
'/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk',
'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages',
'/usr/lib/python2.4/site-packages/Numeric',
'/usr/lib/python2.4/site-packages/gtk-2.0']

If I refer at Larry Martell message, he pointed that the problem was with
sys.path

If I look in ?usr/lib/python2.4/site-packages/
numeric in there on the test machine but absent on the production one

I tried to re-install python-numeric.i386 0:23.7-2.2.2.el5_6.1 and nothig
change; numeric is still not there

On these facts, can somebody point me a solution?

---
Michel Donais


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 06:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org