找回密码
 注册
查看: 2962|回复: 2

glance image-list : Support for it is now deprecated in cryptography, and will b

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-8-13 17:25:39 | 显示全部楼层 |阅读模式
[root@controller1 ~]# glance  image-list
& P- S) u5 S8 @$ Y7 N. r/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.
- I* M: @0 l$ h  from cryptography import utils, x509
, H4 M" x$ a* p/ {5 yinvalid syntax (_pmap.py, line 98)! z7 @5 P4 H) j' u& E$ D, X( F8 {

: J6 `0 O/ `! q* r1 \( I+ Z[root@controller1 src]# glance image-list; ^8 u# Z$ M" K& W+ i7 t) 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.
, f/ G( Q9 j- z" O3 ?% `  from cryptography import utils, x509' f. i* j& i* x2 [  I% o
invalid syntax (_pmap.py, line 98)
9 l0 S' n& f6 J& b! O. Y[root@controller1 src]# vim /usr/lib/python2.7/site-packages/OpenSSL/crypto.py
" R# ^$ e: c6 E# q. G) m0 D+ I1 u9 I; F6 M

, z7 o. s. p. E' f0 Z; q" e6 U; f, D4 H% k6 r
解决过程如下:
: b7 x& t- N5 n, N3 X$ Z( P3 S( {! a9 l& `4 |2 T/ h4 v
[root@controller1 src]# pip install -I utils
7 m* _6 t, p% [( IDEPRECATION: 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.
" I" w* B& j4 u; @& r. qLooking in indexes: http://mirrors.aliyun.com/pypi/simple/
1 {( s' p( r9 N7 l$ P7 Y+ I; MCollecting utils
* C. ?. `, m* J* g/ k) S0 _+ r3 h% \" L  Downloading http://mirrors.aliyun.com/pypi/packages/9b/de/9ffaf89be661b32d1e0cff05e1af5e4fc2d608c47498975e94aca219aed4/utils-0.9.0-py2.py3-none-any.whl (23 kB). l1 |) G, u& ^; i: B" w  G: w$ t
Installing collected packages: utils9 A' w4 a$ E$ z: E- N
Successfully installed utils-0.9.0
1 i  G- |" Z6 l6 o: j9 k[root@controller1 src]# pip install -I cryptography
3 ^& A0 \" \0 h+ g9 b; u5 w5 LDEPRECATION: 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.: U# B3 f$ s* `6 f$ Z
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
5 S7 I7 x2 f! x4 t6 ?, F4 z. @3 _Collecting cryptography$ S8 S/ a2 n; Z
  Downloading http://mirrors.aliyun.com/pypi/packages/bf/a0/c630e9e3b7e7ea2492db1ca47ef7f741ef1a09f19c6642ef1a16ce996d9b/cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)
" w: |1 I/ @8 Y" h6 y& z$ h     |████████████████████████████████| 2.6 MB 607 kB/s ) Y+ v9 y; Z" C1 O2 {. y& _5 I" R
Collecting six>=1.4.1( E$ |0 j& K+ q2 P! C/ e/ L
  Downloading http://mirrors.aliyun.com/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
( L, ]; J3 H0 n; w( o: X* k- DCollecting cffi>=1.124 v$ s, o6 C" q9 T9 K# w  C: N
  Downloading http://mirrors.aliyun.com/pypi/packages/74/f5/f0cb35e78044bf19309e635b20550bf3443322e0ff2ff09e6732c0ed0851/cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl (389 kB)
  ?* ]+ x* Y! R- j  Q: s     |████████████████████████████████| 389 kB 658 kB/s
1 F1 h6 A( J/ K' G% b9 i/ FCollecting ipaddress; python_version < "3"0 n1 D" ]- l% Y
  Downloading http://mirrors.aliyun.com/pypi/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)4 j  H* O2 ]; I4 R8 z- n% V) x: j
Collecting enum34; python_version < "3"+ Q# g7 H7 \, d$ _
  Downloading http://mirrors.aliyun.com/pypi/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl (11 kB)- v: u" ]3 [9 E# N: X, U: h9 e" M4 U
Collecting pycparser
* W) h, S; u, }2 E; [7 ~, |  Downloading http://mirrors.aliyun.com/pypi/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112 kB)& M) z* j% ?) s+ x# F4 s
     |████████████████████████████████| 112 kB 660 kB/s
& b. }; v' N7 Y* {  ^$ C2 B! cInstalling collected packages: six, pycparser, cffi, ipaddress, enum34, cryptography" h) k$ h# Y$ k- d8 F; q/ P
Successfully installed cffi-1.14.6 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.20 six-1.16.0
/ W  p0 {1 l' n3 G2 X+ i[root@controller1 src]# glance image-list7 n% k; ~' R$ ^
/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.
6 G( j+ a1 R: x( o* v2 a% |' o  from cryptography import utils, x509# e+ k% ^- A4 ^* d. X0 M- }
invalid syntax (_pmap.py, line 98)- H3 s! }0 G$ r' Q) r
[root@controller1 src]# yum provides cryptography
2 p4 w, [6 K* t2 C# {Loaded plugins: fastestmirror( j& ^8 u; Q: n. p' D
Loading mirror speeds from cached hostfile7 [0 R2 N7 I; ^2 Q5 Y
* base: mirrors.tuna.tsinghua.edu.cn
9 u# h3 A; w# _6 B+ n; T * epel: mirrors.tuna.tsinghua.edu.cn
0 m; ]' R8 P" s9 m' f4 ] * extras: mirrors.tuna.tsinghua.edu.cn$ S. _3 v( J* l, I
* updates: mirrors.tuna.tsinghua.edu.cn
; u' ?0 n) Q- C( xpython2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library
; h+ N+ V5 p7 BRepo        : base
  h8 q% y/ k7 H, U+ Q7 C1 |: W8 X2 {Matched from:) V6 ?, J. w% d% z4 ?; l  N& I
Filename    : /usr/lib64/python2.7/site-packages/cryptography* B' B; G4 \: _, g6 _2 z( F2 X

% @! X; k4 o6 qpython2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library/ Y9 `, o" k) [6 ?/ q3 I1 w
Repo        : c7-media
% s" w) a2 a/ T" k: m6 H8 YMatched from:
* _  ?7 i. Z, f0 E' @6 N+ s9 H9 ?Filename    : /usr/lib64/python2.7/site-packages/cryptography
+ g: B9 S( O0 B1 Z! z
4 C1 E( D  M3 J8 P& O; h! q3 ^[root@controller1 src]# yum install -y python2-cryptography-1.7.2-2.el7.x86_641 b* j; a7 S6 Y
Loaded plugins: fastestmirror
- m8 F. w+ ^" R! x" Q. T  Q1 X4 i+ `Loading mirror speeds from cached hostfile
6 o! X, x) y; `6 b- f6 C5 kepel/x86_64/metalink                                                                                                                        | 6.7 kB  00:00:00     8 s8 T! k" E0 I/ V# P' ^
* base: mirrors.tuna.tsinghua.edu.cn
" @: R  J, W0 N3 t. P. n. u * epel: mirrors.tuna.tsinghua.edu.cn# S! k/ Y, ~5 ~( y2 Z3 R
* extras: mirrors.tuna.tsinghua.edu.cn
, n  ~. V* @7 f; q& \, t8 [ * updates: mirrors.tuna.tsinghua.edu.cn& Q/ a( S8 m3 G- _2 D5 r
base                                                                                                                                        | 3.6 kB  00:00:00     
6 h9 B' L+ i) B1 W5 Z- `c7-media                                                                                                                                    | 2.9 kB  00:00:00     
' B) W% Q' }( J' oceph                                                                                                                                        | 2.9 kB  00:00:00     
3 f; X- n, L) W$ Q% x1 v" b! zdocker-ce-stable                                                                                                                            | 3.5 kB  00:00:00     
5 ~0 i2 g# W$ R! O. t7 G
6 x& t( J1 d$ D& h, f

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-13 17:41:36 | 显示全部楼层
[root@controller1 src]# glance image-list --debug6 N5 h- p1 T2 Y
Traceback (most recent call last):; i( W0 {* z/ V$ H" g
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main+ t% Z, s2 F5 i- r2 A* U" g
    OpenStackImagesShell().main(argv)
! N% @4 J5 N2 C+ L& F) @( d. f2 x' L  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main" V9 V9 ?) t" f) R2 B
    sub_parser = _get_subparser(api_version): z, n% i, o9 P, w! C5 L' I
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser
, z/ a6 f* i/ P0 |( K& k    return self.get_subcommand_parser(api_version, argv)! c4 z+ W& V. m. i( B) n
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser
4 e, ?0 x+ s! A    version, 'shell')
8 b. ~* i2 n+ d+ g! i* J  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module5 `/ @1 w% q* B2 R1 b) f
    return import_module(module_str): @* W# h7 x5 ^$ z3 o
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module, m' k& [- ^! ^
    __import__(import_str)
  d* g+ ]' @$ I& ]1 \, _  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>4 T) q' `! n6 }  a  ^* ?6 [
    from glanceclient.v2.client import Client      # noqa: `' |6 A' J1 z! a
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 17, in <module>! }: `8 R, O7 Z- R5 B
    from glanceclient.common import http
7 Q; {& ~  w1 k: _' n+ T7 ^  File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 22, in <module>
1 f3 L4 e) _, }7 C    import OpenSSL2 R9 i7 X$ d% y- u( T
  File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
/ A. Z7 f5 N% F, }5 T0 F    from OpenSSL import crypto, SSL" u' z& _  @# K: @5 J4 _7 ]
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 14, in <module>
2 c- M( T- Z; f/ G, Y    from cryptography import utils, x509& x7 Q4 E, Q$ q- l
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/__init__.py", line 7, in <module>& c0 I& Q- }0 v) M
    from cryptography.x509.base import (
& L8 b8 j1 s! \2 Y  File "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py", line 16, in <module>3 p! x5 _9 `3 r$ Z
    from cryptography.x509.extensions import Extension, ExtensionType
- ~  \* Z$ F9 ~2 \4 l  File "/usr/lib64/python2.7/site-packages/cryptography/x509/extensions.py", line 20, in <module>
8 y# ?# k. P: q9 i* _' m    from cryptography.hazmat.primitives import constant_time, serialization+ j. u  b: P# r5 D* G" ]
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
5 w% _+ O% V4 i& x* u    from cryptography.hazmat.primitives.serialization.base import (
7 h/ l: T+ l2 g+ a5 t  I. f/ A, W  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 13, in <module>
. F7 {' C) ~' L$ u    from cryptography.hazmat.backends import _get_backend2 N) Q0 o8 N; e1 x+ w
ImportError: cannot import name _get_backend
  O2 r0 t5 u' }1 G: acannot import name _get_backend9 t0 F1 Y6 f! j8 v% d

. I' r" K0 B1 ]. Q3 s' U& Y安装下面包:
. o+ g% V6 Z% @) _7 jpip install -U platformio
) z- N: U2 J- F& i% O

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-13 17:50:30 | 显示全部楼层
[root@controller1 ~]# pip install -I cryptography+ ]- J  v# D( Q  Y
DEPRECATION: 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/de ... s/#python-2-support pip 21.0 will remove support for this functionality.# L0 W9 U+ p$ C  A9 y: H
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
0 a* T1 R/ M& p1 UCollecting cryptography
( T1 y# |+ ?5 G! w  Downloading http://mirrors.aliyun.com/pypi/p ... inux2010_x86_64.whl (2.6 MB)1 @2 d- N- A% N: `: C
     |████████████████████████████████| 2.6 MB 303 kB/s
7 v/ u9 a% k, g9 x5 z% J& K# gCollecting cffi>=1.12  w- z! {. O8 t. S# o' E
  Downloading http://mirrors.aliyun.com/pypi/p ... nylinux1_x86_64.whl (389 kB)+ I# B8 ^: e9 p8 Y! ]
     |████████████████████████████████| 389 kB 267 kB/s 0 I% ~  i" G+ a1 `/ ?2 g) L
Collecting six>=1.4.1
4 c3 r5 ]3 |5 H( K* |7 W6 m$ W  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (11 kB)
* ]- c! x2 n" S& hCollecting ipaddress; python_version < "3"
$ R$ k) c( s7 Y' @$ r  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (18 kB)4 R( L) Y3 d( ]
Collecting enum34; python_version < "3") f! Q1 d. z' d( O3 R8 |& F6 ~! x: K
  Downloading http://mirrors.aliyun.com/pypi/p ... 10-py2-none-any.whl (11 kB)7 J$ p# T1 Q$ Y
Collecting pycparser* N. q& T+ }! g
  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (112 kB)/ X) w' d- n9 b% p+ x& w+ n4 j* K
     |████████████████████████████████| 112 kB 414 kB/s
9 |2 }1 S* u0 T: W; c6 g, g% AInstalling collected packages: pycparser, cffi, six, ipaddress, enum34, cryptography$ o* h3 f9 d1 _6 H. ~
Successfully installed cffi-1.14.6 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.20 six-1.16.0
5 P# \2 i- Y- S7 ][root@controller1 ~]# glance image-list --debug
4 E- N. }5 M/ X3 b/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.
; W+ j& h0 t. O: }3 z$ K: r: n  from cryptography import utils, x509
5 F0 ]# S2 N& u% {) Y- xTraceback (most recent call last):7 J1 ~4 U- s' w4 B$ U& q+ ~
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main! X2 u% w1 H$ F8 W% _  C- e
    OpenStackImagesShell().main(argv)8 `* B' ]9 t- A  q. X
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main& U8 Q4 J8 X; X9 I: [: u3 U
    sub_parser = _get_subparser(api_version)
3 E6 B! D3 P3 ^6 K  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser
: l. S, c; Q0 ]- t9 c1 d    return self.get_subcommand_parser(api_version, argv)
$ ^- e5 B8 D0 D. r1 U) V2 x, T  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser; O; u7 u: q" W6 C4 e) [& W' k5 d$ h
    version, 'shell')
, j" ?5 ]/ L: a% e& y8 I( \  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module. {0 D; Z4 N; v1 p
    return import_module(module_str)4 S/ j. O6 w' {# A* Z/ S
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module' Y+ A' a7 u* G- U1 P' G3 t" i2 N
    __import__(import_str)# V, }. f; h" l4 ^
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>
4 k1 I. @' g2 t  e9 L& w+ G    from glanceclient.v2.client import Client      # noqa* K* f* g, c/ W
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 19, in <module>0 a5 Y8 a9 M# o
    from glanceclient.v2 import image_members2 q: L3 i9 r+ n9 s+ R; U3 E
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/image_members.py", line 16, in <module>
) G3 b. b7 N' Q; Q, k; d) Z    import warlock
7 \5 O: J+ T! p+ w  File "/usr/lib/python2.7/site-packages/warlock/__init__.py", line 17, in <module>* q1 K  Z) k7 q, }2 D/ A
    from warlock.core import model_factory  # NOQA
1 p  z2 y3 b2 e4 |; M8 o5 @  File "/usr/lib/python2.7/site-packages/warlock/core.py", line 19, in <module>
% |0 Q. U* j8 _' u. ^8 a0 t7 ^    from . import model
+ U& h2 g8 G. B* Q$ W/ B, d  File "/usr/lib/python2.7/site-packages/warlock/model.py", line 21, in <module>
) h* x; M2 G" L    import jsonschema
, j+ W6 V3 C6 m: |  File "/usr/lib/python2.7/site-packages/jsonschema/__init__.py", line 21, in <module>! v* f/ b, n+ E' j2 O# t: c. p
    from jsonschema._types import TypeChecker3 e# A8 s- \: m2 d8 c
  File "/usr/lib/python2.7/site-packages/jsonschema/_types.py", line 3, in <module>
9 E+ w0 o) k# |3 L: d/ S" C9 I    from pyrsistent import pmap8 l4 V# r+ }, }5 v* n/ {6 G0 V: s
  File "/usr/lib64/python2.7/site-packages/pyrsistent/__init__.py", line 3, in <module>
& v- z4 K; T$ h. \/ @. l+ T    from pyrsistent._pmap import pmap, m, PMap
/ Z& g0 J3 s0 \( v" N6 {2 K  File "/usr/lib64/python2.7/site-packages/pyrsistent/_pmap.py", line 982 E, G( B6 i/ `
    ) from e
) [! e- Q) g) a! n8 D$ T, ~         ^
$ K7 f0 {+ ?2 q9 ]SyntaxError: invalid syntax' n6 _* _0 j- d: O* T6 U
invalid syntax (_pmap.py, line 98)
; h: n2 ~, q1 y/ j: [[root@controller1 ~]# openstack image list 5 I+ o7 k& D& p
+--------------------------------------+----------------------+--------+8 {# u- c) U6 P# q8 i, D
| ID                                   | Name                 | Status |
5 ^& |$ B* p) x2 W& h2 t1 n+--------------------------------------+----------------------+--------+
+ E: o. h( |2 i! w' S0 r| d25d8b59-dfff-4f2b-b63e-aa22dc533778 | centos7.9-origin-hdd | active |. }1 i$ g4 h# ^6 a0 w
+--------------------------------------+----------------------+--------+
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 05:31 , Processed in 0.022002 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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