xsnippet logotype

xsnippet

PYTHONPATH [ Text only ]

by Guest
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[root@cci06-rally01 sbin(openstack_admin_LinuxEng)]# ll
total 4
-rwxrwxrwx. 1 root root 1410 Jun  7 15:51 rally_test_auth.py
[root@cci06-rally01 sbin(openstack_admin_LinuxEng)]# python rally_test_auth.py 
Traceback (most recent call last):
  File "rally_test_auth.py", line 1, in <module>
    from keystoneauth1 import discover
ImportError: No module named 'keystoneauth1'
[root@cci06-rally01 sbin(openstack_admin_LinuxEng)]# python -V 
Python 3.5.1
[root@cci06-rally01 sbin(openstack_admin_LinuxEng)]# python 
Python 3.5.1 (default, Sep 15 2016, 08:30:32) 
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keystoneauth1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'keystoneauth1'
>>> 
[root@cci06-rally01 sbin(openstack_admin_LinuxEng)]# cd ~/.rally 
[root@cci06-rally01 .rally(openstack_admin_LinuxEng)]# ll
total 68
-rw-r--r--. 1 root root 102 Jun  7 14:07 globals
lrwxrwxrwx. 1 root root  56 Jun  7 14:07 openrc -> /root/.rally/openrc-f0e595f1-a019-483f-86a0-31233e8a7e86
-rw-r--r--. 1 root root 338 May 31 12:34 openrc-01bad721-68eb-4282-9698-811eb6e96e1b
-rw-r--r--. 1 root root 343 Jun  2 10:15 openrc-1965eb19-d865-46a1-8240-3d79c505ed66
-rw-r--r--. 1 root root 356 May 31 12:29 openrc-346fe641-8030-45d1-91c2-e2b7196b4a18
-rw-r--r--. 1 root root 545 Jun  1 16:44 openrc-4014dfcd-a5e0-4a4d-823b-39c4cd877b19
-rw-r--r--. 1 root root 462 Jun  2 08:20 openrc-46b1a3ff-0e7c-44fb-9624-2441f76141f8
-rw-r--r--. 1 root root 356 Jun  1 15:26 openrc-48632e20-20ea-4c65-a785-5b1694bbd69c
-rw-r--r--. 1 root root 364 May 31 12:43 openrc-4b090bb3-c9f4-412e-bf01-5cc5a5aad6b9
-rw-r--r--. 1 root root 353 Jun  1 15:31 openrc-5b1d353a-f941-4f24-8de6-eab743cecdb1
-rw-r--r--. 1 root root 464 Jun  6 08:40 openrc-6f725f19-d0a9-4d1b-9919-1632ff988f18
-rw-r--r--. 1 root root 351 Jun  1 15:20 openrc-740fef0c-533e-4326-a6b0-e0f0143d8b86
-rw-r--r--. 1 root root 301 May 31 12:45 openrc-8d662cd6-aae2-448e-9ad2-8156df0286e1
-rw-r--r--. 1 root root 454 Jun  1 16:15 openrc-91c73566-0761-45a2-8780-8897bf0d96b6
-rw-r--r--. 1 root root 464 Jun  2 10:29 openrc-94d3364b-9986-4c4c-bf82-6a19114d4c31
-rw-r--r--. 1 root root 464 Jun  2 08:24 openrc-a719d348-6d75-46e1-91c3-03537a216e32
-rw-r--r--. 1 root root 464 Jun  7 14:07 openrc-f0e595f1-a019-483f-86a0-31233e8a7e86
-rw-r--r--. 1 root root 343 Jun  6 08:39 openrc-fc8cb090-0384-4e0b-ae1f-9961392b4979
lrwxrwxrwx. 1 root root  56 May 31 14:31 openrc.orig -> /root/.rally/openrc-740fef0c-533e-4326-a6b0-e0f0143d8b86
[root@cci06-rally01 .rally(openstack_admin_LinuxEng)]# cd /opt/rh/
[root@cci06-rally01 rh(openstack_admin_LinuxEng)]# ll
total 0
dr-xr-xr-x. 3 root root 32 May 29 16:15 python27
dr-xr-xr-x. 3 root root 32 May 31 11:25 rh-python35
[root@cci06-rally01 rh(openstack_admin_LinuxEng)]# cd rh-python35/
[root@cci06-rally01 rh-python35(openstack_admin_LinuxEng)]# ll
total 4
-rw-r--r--.  1 root root 433 Feb 16  2016 enable
dr-xr-xr-x. 15 root root 202 May 31 11:25 root
[root@cci06-rally01 rh-python35(openstack_admin_LinuxEng)]# cat enable 
export PATH=/opt/rh/rh-python35/root/usr/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export MANPATH=/opt/rh/rh-python35/root/usr/share/man:$MANPATH
export PKG_CONFIG_PATH=/opt/rh/rh-python35/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
export XDG_DATA_DIRS="/opt/rh/rh-python35/root/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
[root@cci06-rally01 rh-python35(openstack_admin_LinuxEng)]# source enable 
[root@cci06-rally01 rh-python35(openstack_admin_LinuxEng)]# env |grep PATH 
MANPATH=/opt/rh/rh-python35/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:
LD_LIBRARY_PATH=/opt/rh/rh-python35/root/usr/lib64:/opt/rh/rh-python35/root/usr/lib64
PATH=/opt/rh/rh-python35/root/usr/bin:/opt/rh/rh-python35/root/usr/bin:/usr/lib64/qt-3.3/bin:/root/rally/rally-master/venv/cci06/bin:/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
PKG_CONFIG_PATH=/opt/rh/rh-python35/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig


[root@cci06-rally01 rh-python35(openstack_admin_LinuxEng)]# cd ../python27/
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# ls -lahrt
total 4.0K
-rw-r--r--.  1 root root 451 Apr 20  2016 enable
dr-xr-xr-x.  3 root root  32 May 29 16:15 .
dr-xr-xr-x. 17 root root 224 May 29 16:15 root
drwxr-xr-x.  4 root root  41 May 31 11:25 ..
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# source enable 
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# python -V
Python 2.7.13

####



[root@cci06-rally01 rh-python35(openstack_admin_LinuxEng)]# cd ../python27/
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# ls -lahrt
total 4.0K
-rw-r--r--.  1 root root 451 Apr 20  2016 enable
dr-xr-xr-x.  3 root root  32 May 29 16:15 .
dr-xr-xr-x. 17 root root 224 May 29 16:15 root
drwxr-xr-x.  4 root root  41 May 31 11:25 ..
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# source enable 
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# python -V
Python 2.7.13
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# env |grep PATH 
MANPATH=/opt/rh/python27/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:
LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64:/opt/rh/rh-python35/root/usr/lib64:/opt/rh/rh-python35/root/usr/lib64
PATH=/opt/rh/python27/root/usr/bin:/opt/rh/rh-python35/root/usr/bin:/opt/rh/rh-python35/root/usr/bin:/usr/lib64/qt-3.3/bin:/root/rally/rally-master/venv/cci06/bin:/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbinn
PKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# echo $PYTHONPATH

[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# PYTHONPATH="/usr/lib/python2.7/site-packages/":${PYTHONPATH}"
> ^C
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# PYTHONPATH="/usr/lib/python2.7/site-packages/":"${PYTHONPATH}"
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# export PYTHONPATH
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# echo $PYTHONPATH
/usr/lib/python2.7/site-packages/:
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# env |grep PATH 
MANPATH=/opt/rh/python27/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:/opt/rh/rh-python35/root/usr/share/man:
LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64:/opt/rh/rh-python35/root/usr/lib64:/opt/rh/rh-python35/root/usr/lib64
PATH=/opt/rh/python27/root/usr/bin:/opt/rh/rh-python35/root/usr/bin:/opt/rh/rh-python35/root/usr/bin:/usr/lib64/qt-3.3/bin:/root/rally/rally-master/venv/cci06/bin:/opt/rh/rh-python35/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbinn
PYTHONPATH=/usr/lib/python2.7/site-packages/:
PKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig:/opt/rh/rh-python35/root/usr/lib64/pkgconfig
[root@cci06-rally01 python27(openstack_admin_LinuxEng)]# 


####

[root@cci06-rally01 cci06(openstack_admin_LinuxEng)]# ll
total 120
drwxr-xr-x.  3 root root  4096 May 31 12:00 bin
drwxr-xr-x.  2 root root    42 Jun  7 14:07 database
drwxr-xr-x.  4 root root    44 May 31 12:01 etc
drwxr-xr-x.  3 root root    36 May 31 12:00 include
drwxr-xr-x.  3 root root    23 May 31 11:59 lib
lrwxrwxrwx.  1 root root     3 May 31 11:59 lib64 -> lib
-rw-r--r--.  1 root root    60 May 31 11:59 pip-selfcheck.json
-rwxrwxrwx.  1 root root  1435 Jun  7 16:17 rally_test_auth.py
drwxr-xr-x.  5 root root    71 May 31 12:01 samples
drwxr-xr-x.  3 root root    48 May 31 12:00 share
drwxr-xr-x. 11 root root  4096 May 31 11:59 src
-rw-r--r--.  1 root root 99021 May 31 11:59 virtualenv-15.1.0.py
[root@cci06-rally01 cci06(openstack_admin_LinuxEng)]# ./rally_test_auth.py 
Traceback (most recent call last):
  File "./rally_test_auth.py", line 3, in <module>
    from keystoneauth1 import discover
  File "/usr/lib/python2.7/site-packages/keystoneauth1/discover.py", line 26, in <module>
    from positional import positional
  File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 17, in <module>
    import wrapt
ImportError: No module named wrapt
[root@cci06-rally01 cci06(openstack_admin_LinuxEng)]# python -V 
Python 2.7.13
[root@cci06-rally01 cci06(openstack_admin_LinuxEng)]# echo $PYTHONPATH 
/usr/lib/python2.7/site-packages/
[root@cci06-rally01 cci06(openstack_admin_LinuxEng)]# python 
Python 2.7.13 (default, Feb  8 2017, 06:57:18) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import keystoneauth1
>>> import wrapt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named wrapt
>>> 
[root@cci06-rally01 cci06(openstack_admin_LinuxEng)]# rpm -qa |grep python-wrapt 
python-wrapt-1.10.8-2.el7ost.x86_64