找回密码
 注册
查看: 946|回复: 0

openstack server list import queue ImportError: No module named queue erro

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-3-31 14:00:02 | 显示全部楼层 |阅读模式
[root@bogon datanfs]# openstack server list
! b, I/ q0 [+ }; @$ ?/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.5 g& X  E# p- t  w2 _3 o- z8 H, c
  from cryptography import utils, x509
; r, b) B% o0 x* D% ETraceback (most recent call last):( Y0 w& t" ]( [2 i
  File "/usr/bin/openstack", line 5, in <module>
# L/ s( I. b+ e$ e7 b. E    from openstackclient.shell import main% w0 c: [+ O6 |
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 24, in <module>
- G0 B( B. t' K/ d    from osc_lib import shell. f& _. {0 J7 q8 N* e
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 33, in <module>
" s! e' C3 Q* a, w8 L: n6 w    from osc_lib.cli import client_config as cloud_config
5 S) Q  `* t/ j9 t1 O: |- J/ X: ^  File "/usr/lib/python2.7/site-packages/osc_lib/cli/client_config.py", line 18, in <module>
8 [0 W# A6 k8 A& @! R' c# w- f7 o    from openstack.config import exceptions as sdk_exceptions# G4 [  I, x# F: O9 S% J% b- N/ [
  File "/usr/lib/python2.7/site-packages/openstack/__init__.py", line 16, in <module>* J2 c" H3 a3 w$ Q# {
    import openstack.config
3 V$ J: z; Y7 y$ p& A. q1 b; u9 I  File "/usr/lib/python2.7/site-packages/openstack/config/__init__.py", line 17, in <module>5 ?% U/ w/ n! l1 j% e
    from openstack.config.loader import OpenStackConfig  # noqa% \, g7 {( g8 g& \. k5 x5 q
  File "/usr/lib/python2.7/site-packages/openstack/config/loader.py", line 33, in <module>
- K4 j" F/ w9 ]" q3 N" {1 l    from openstack.config import cloud_region
$ B, ?$ p6 t5 h  File "/usr/lib/python2.7/site-packages/openstack/config/cloud_region.py", line 44, in <module>* F) K0 z% G7 ]; l& g- _# N
    from openstack import proxy2 A6 j4 S0 W' g
  File "/usr/lib/python2.7/site-packages/openstack/proxy.py", line 24, in <module>- I4 u( W  R, w; K6 R" R
    from openstack import resource+ ^/ w5 b9 p& }
  File "/usr/lib/python2.7/site-packages/openstack/resource.py", line 49, in <module>) M$ p& ~4 h5 x( B
    from openstack import utils* y8 g7 Q5 G4 J1 Q
  File "/usr/lib/python2.7/site-packages/openstack/utils.py", line 13, in <module>
0 ?, j& l+ g+ P& G4 w( r' D    import queue
" t. U: W6 F% r/ tImportError: No module named queue
/ c/ o( d  x: Q' ?% n4 j[root@bogon datanfs]#
, W5 I0 N* m& b5 Y/ z6 O2 z' |Connection closed by foreign host.8 Y% P1 M1 O- |0 T6 P3 q2 m
Disconnected from remote host(192.168.0.71) at 12:57:22.3 K1 c' j& Z$ T% S$ A) c% O- H; f
Type `help' to learn how to use Xshell prompt.
! k# H: d, S- Y- X6 R& f$ p/ Y[d:\~]$ 3 R3 B" ^) V  ?  @
Connecting to 192.168.0.71:22...! Z8 f: U. `! {9 l7 v
Connection established.9 a  r+ G+ S6 N9 n! L3 J
To escape to local shell, press 'Ctrl+Alt+]'.
( F- S7 `9 G& WLast login: Thu Mar 31 12:28:52 2022 from 192.168.2.158
$ ~7 F4 ]5 H# u2 V[root@bogon ~]# pip install queue
  q. {; B- K, T4 \* q  c( m" c8 XDEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.8 N' A0 E2 H) Y( K' i6 P8 c+ @- o
ERROR: Could not find a version that satisfies the requirement queue (from versions: none)2 t& N' a. D1 k  b2 }
ERROR: No matching distribution found for queue7 i$ z  k5 Y  F( e/ Z6 N- Y

4 O4 b8 D) I. l. I既然安装不上,何不考虑注释这个模块:
1 {' p. ~8 T/ J7 H8 @1 ~0 f: m8 R& w& b8 l% g% l3 N/ c
[root@bogon ~]# vim /usr/bin/openstack  v! I& \5 S( I. L. `
[root@bogon ~]# vim /usr/lib/python2.7/site-packages/openstack/utils.py
4 O' Y% e7 V7 [' K7 p
  g. T# H6 U  X& f7 ?+ J8 y) k
2 H, U! o! |3 k  h* d4 a  i& N[root@bogon ~]# openstack server list0 ^4 x. y" k* }- G+ T' ~. t6 V
/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
& g. |. N: ^' [1 Q3 |7 _7 H  from cryptography import utils, x509
- c  s$ r+ L+ f/ NTraceback (most recent call last):0 e* V% W5 v. m& y' t. S+ i9 v
  File "/usr/bin/openstack", line 5, in <module>/ O+ ?! N7 F! p, O/ {' O
    from openstackclient.shell import main9 B3 {% g: N% e8 i2 O) Y1 @" j
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 24, in <module>. ~- K! R* w( ]9 x% A
    from osc_lib import shell, L6 h' _& W$ @" w# u/ D  s0 [
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 33, in <module>
' X1 }" K0 ~  n: [% T    from osc_lib.cli import client_config as cloud_config
- d0 `9 f8 }) K/ _# s/ M- D( f4 _  File "/usr/lib/python2.7/site-packages/osc_lib/cli/client_config.py", line 18, in <module>$ A$ l* u& G" Y0 s* x
    from openstack.config import exceptions as sdk_exceptions
+ ?9 L. V/ q3 t0 l. L9 g8 [  File "/usr/lib/python2.7/site-packages/openstack/__init__.py", line 17, in <module>6 j. ?- J7 }$ `4 M6 g8 _
    import openstack.connection& ^2 U3 X! @& ?9 A2 ]) P% P
  File "/usr/lib/python2.7/site-packages/openstack/connection.py", line 189, in <module>
) ~/ @/ o% ~) w    from openstack.cloud import openstackcloud as _cloud+ a- o- |: T  j6 r) m
  File "/usr/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py", line 14, in <module>$ D, h, m7 G  q  M
    import queue0 p' n) [9 j* i- ~* T- s
ImportError: No module named queue
& E& c3 w( `2 t5 N1 Q( d- \! T% S+ z[root@bogon ~]# sou" n/ S" N, q+ V' C) X9 v
sound_dump    soundstretch  source          E" C6 I$ u+ j/ x5 Z
[root@bogon ~]# source admin-openrc.sh
' i* s/ m5 @1 x) @7 i* F: B5 T5 D( h' v  y' w, k$ t

4 ]5 ]& u5 h: X[root@bogon ~]# openstack server list
1 q9 \* _) {3 L2 T. l& ~/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
7 E; M! U  s! m  m, K6 V7 t  from cryptography import utils, x509
* J9 `1 a; J9 ~2 mTraceback (most recent call last):
% d4 v/ T4 Q6 o$ R  File "/usr/bin/openstack", line 5, in <module>- g; H5 M9 d3 j: G: E( c
    from openstackclient.shell import main
0 K4 z9 T" E& F" c( y  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 24, in <module>0 x: l: s( Q2 N2 _: i2 v" ^
    from osc_lib import shell
' @: S4 r! ^' S% V- p$ q! F  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 33, in <module>
8 `+ O" K- s+ H    from osc_lib.cli import client_config as cloud_config
7 w% |' t! R3 v2 h6 r' v* @  File "/usr/lib/python2.7/site-packages/osc_lib/cli/client_config.py", line 18, in <module>* m, ?/ B: j& T7 U5 G7 |% a/ {. k
    from openstack.config import exceptions as sdk_exceptions
( b9 @2 F& q' Y3 E/ `* }; v  File "/usr/lib/python2.7/site-packages/openstack/__init__.py", line 17, in <module>6 \, t# F% ]4 S, ]% l: w" k5 ^
    import openstack.connection
1 a* _, E" S5 u+ i' V2 O  File "/usr/lib/python2.7/site-packages/openstack/connection.py", line 189, in <module>
; n1 n4 z5 L! c+ q    from openstack.cloud import openstackcloud as _cloud9 M8 Y8 L5 i7 R, j" a' B
  File "/usr/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py", line 14, in <module>
: l0 d8 q6 Q9 t: Q4 v    import queue
5 s, \) ]3 h0 F  mImportError: No module named queue
( \* _$ y4 V7 Y3 p, I[root@bogon ~]# openstack server list
8 L. E! S( Q0 Y/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.$ f8 }7 J4 R( O. s. f
  from cryptography import utils, x509
, c9 W7 l- }7 q( T. wTraceback (most recent call last):! N- ?: h% {" M) J6 S
  File "/usr/bin/openstack", line 5, in <module>
! @6 @+ v0 e' |# b4 B' [. y- s& b5 ?    from openstackclient.shell import main3 Q6 j# Y% {+ w1 y. l0 Z) Z9 ?
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 24, in <module>
0 Y7 A: L6 C% A1 |/ t$ c    from osc_lib import shell
% t; P5 J" e4 f9 n6 y8 }7 m% A  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 33, in <module>9 M9 x  b- \% m3 x/ J$ D8 m
    from osc_lib.cli import client_config as cloud_config4 t8 u6 Z! Z. i" x
  File "/usr/lib/python2.7/site-packages/osc_lib/cli/client_config.py", line 18, in <module>
+ v6 u- j9 U: h. a7 e    from openstack.config import exceptions as sdk_exceptions, ~% k1 k7 P- A0 J; V
  File "/usr/lib/python2.7/site-packages/openstack/__init__.py", line 17, in <module>
6 z- ~7 g4 j, ^; Q) N, E2 r    import openstack.connection
4 U2 H. C) V0 a; Q  File "/usr/lib/python2.7/site-packages/openstack/connection.py", line 189, in <module>' G% h# j& S* U" Y2 o. m+ H
    from openstack.cloud import openstackcloud as _cloud
$ {7 l& u! X4 D  }8 R, H- G) w  File "/usr/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py", line 14, in <module>
4 T! W) }3 u3 O. D0 P& ?5 v, t+ o    import queue
- @! @0 i' m! z% u2 VImportError: No module named queue
' @" ~& W' ^1 J6 Q5 o$ K( @4 N3 k, m1 l; w, Q8 V, y# H
注释到最下面的 import  queue
4 L9 l  }( H2 t; U* w2 T. q! g4 Y, L) Y
[root@bogon ~]# vim /usr/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py
% K! l* p, C& U4 c& @. k7 s[root@bogon ~]# openstack server list7 Y! u  \0 l" G% a' Z$ _
/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.5 C9 [* _3 A1 Z- J( Q
  from cryptography import utils, x5093 }3 K5 l# t9 ~3 `- i
+--------------------------------------+-----------------+--------+--------------------------+------------------+------------------------+. ?5 a0 Z, p8 v) ]. w
| ID                                   | Name            | Status | Networks                 | Image            | Flavor                 |
/ K7 c2 o- j5 L) i* l+ O+--------------------------------------+-----------------+--------+--------------------------+------------------+------------------------+8 G# h. \/ n& m* p" B
| a8192ecd-56a3-4b45-89b5-444b169e4f4e | qianyi          | ACTIVE | linuxbrdge=192.168.0.186 |                  | big                    |
4 _% b0 E' F* T| a3291e02-17d7-4730-a953-580085774e1d | build-test      | ACTIVE | linuxbrdge=192.168.0.178 |                  | type-8c-16g-101g-Hygon |% Y+ @# z) P+ `! V( }
| 91f92820-5bf9-4f37-b725-cc178597d6c8 | windows2019more | ACTIVE | linuxbrdge=192.168.0.173 |                  | type-4c-8g-40g         |; u4 q! Q* I+ m- G
| 40702a5a-e4d1-42e4-bd22-44f2d3fb0b5d | windows2019     | ACTIVE | linuxbrdge=192.168.0.172 |                  | type-4c-8g-40g         |
& F, K7 l$ q5 g1 h& n6 Q| 0dafccc1-6c71-459d-8f8d-fdeb76855756 | redis-3         | ACTIVE | linuxbrdge=192.168.0.219 |                  | type-4c-16g-50g        |
( \7 i; H. U. X, M9 B| ed7906a5-36f0-4715-b5ca-21284b22a117 | redis-2         | ACTIVE | linuxbrdge=192.168.0.218 |                  | type-4c-16g-50g        |
1 L, Z1 [+ z7 f6 {, o| c05c22bf-5834-4b4d-a3c1-64195017bf1f | redis-1         | ACTIVE | linuxbrdge=192.168.0.217 |                  | type-4c-16g-50g        |
2 H, p# u( [# B1 G| 10916f1e-468a-48d9-85f4-db2c5d55ff45 | wang-3-admin    | ACTIVE | linuxbrdge=192.168.0.179 | CentOS7.9_x86_64 | type-2c-2g-5g-Intel    |
3 _% B, B! ?3 o6 T) s| 5d6eebc6-cffb-4d79-b981-5f6e6a36983f | wang-1-admin    | ACTIVE | linuxbrdge=192.168.0.176 | CentOS7.9_x86_64 | type-2c-2g-5g-Intel    |
# {: q+ K. C7 A1 Q| b908cb60-72ed-440c-827e-495535e907f3 | wang-admin      | ACTIVE | linuxbrdge=192.168.0.188 | CentOS7.9_x86_64 | type-2c-2g-5g-Intel    |; r' k/ N8 i/ y- x0 m
| a9e4c317-1722-4ccd-a4c5-5c803c7132f0 | ceshi-admin     | ACTIVE | linuxbrdge=192.168.0.183 | CentOS7.9_x86_64 | type-1c-1g-4g-Hygon    |7 ]  w* s6 O) I) Q0 i5 z5 G! W  u
+--------------------------------------+-----------------+--------+--------------------------+------------------+------------------------+' S8 F+ u0 X) o9 [
[root@bogon ~]#
& E4 D1 `' H/ G- O5 W2 `! A; t8 F8 j  v1 v4 v

/ J8 `1 Y  s; g! X0 O问题解决了。9 W+ J" U9 I' d( i

& {- ^- l; H, `* f[root@bogon ~]# : @- U. U3 F. }% h: |! x
[root@bogon ~]# 0 j( W" k- M6 V: b
[root@bogon ~]#
4 i8 P7 l# h* J3 r: w! v[root@bogon ~]# openstack server list
: `- C3 k4 C6 e+ d* U2 j" z& E/usr/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.7 t! d8 V! l9 G: |  m" M- z( G
  from cryptography import utils, x509
9 T# n( Z0 W  a+--------------------------------------+-----------------+--------+--------------------------+------------------+------------------------+4 w! w) d' l8 B% D: S1 z2 Z2 Y/ Q
| ID                                   | Name            | Status | Networks                 | Image            | Flavor                 |
  R7 G) G; ^# U" ^) c9 ^; Y% E5 b+--------------------------------------+-----------------+--------+--------------------------+------------------+------------------------+8 j9 V/ J% s5 s. Q/ q' I8 y
| a8192ecd-56a3-4b45-89b5-444b169e4f4e | qianyi          | ACTIVE | linuxbrdge=192.168.0.186 |                  | big                    |
* |2 l2 J- W6 K$ X% y3 ~" _| a3291e02-17d7-4730-a953-580085774e1d | build-test      | ACTIVE | linuxbrdge=192.168.0.178 |                  | type-8c-16g-101g-Hygon |, W6 l: `! Q9 `$ S1 |5 @
| 91f92820-5bf9-4f37-b725-cc178597d6c8 | windows2019more | ACTIVE | linuxbrdge=192.168.0.173 |                  | type-4c-8g-40g         |, S+ V. e. V9 o% C3 X2 F
| 40702a5a-e4d1-42e4-bd22-44f2d3fb0b5d | windows2019     | ACTIVE | linuxbrdge=192.168.0.172 |                  | type-4c-8g-40g         |. n: G7 j; j" x8 _
| 0dafccc1-6c71-459d-8f8d-fdeb76855756 | redis-3         | ACTIVE | linuxbrdge=192.168.0.219 |                  | type-4c-16g-50g        |
* O5 W* C/ o  k# U" j+ ~3 v! ~( E| ed7906a5-36f0-4715-b5ca-21284b22a117 | redis-2         | ACTIVE | linuxbrdge=192.168.0.218 |                  | type-4c-16g-50g        |
0 _! r9 E8 C7 ~| c05c22bf-5834-4b4d-a3c1-64195017bf1f | redis-1         | ACTIVE | linuxbrdge=192.168.0.217 |                  | type-4c-16g-50g        |
7 t1 Y) r" J& H& [6 B! p| 10916f1e-468a-48d9-85f4-db2c5d55ff45 | wang-3-admin    | ACTIVE | linuxbrdge=192.168.0.179 | CentOS7.9_x86_64 | type-2c-2g-5g-Intel    |1 g' \% f% j5 g! H1 P
| 5d6eebc6-cffb-4d79-b981-5f6e6a36983f | wang-1-admin    | ACTIVE | linuxbrdge=192.168.0.176 | CentOS7.9_x86_64 | type-2c-2g-5g-Intel    |1 H; l& B, d9 }2 C. i  Z5 n3 U4 r
| b908cb60-72ed-440c-827e-495535e907f3 | wang-admin      | ACTIVE | linuxbrdge=192.168.0.188 | CentOS7.9_x86_64 | type-2c-2g-5g-Intel    |2 u0 R* ]# ?& ^# A; I# ~
| a9e4c317-1722-4ccd-a4c5-5c803c7132f0 | ceshi-admin     | ACTIVE | linuxbrdge=192.168.0.183 | CentOS7.9_x86_64 | type-1c-1g-4g-Hygon    |
9 W9 x2 E, R, p3 s+--------------------------------------+-----------------+--------+--------------------------+------------------+------------------------+
# d9 V5 Q7 A: A: o3 x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:57 , Processed in 0.020339 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表