易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 2958|回复: 2
收起左侧

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

[复制链接]
发表于 2021-8-13 17:25:39 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
[root@controller1 ~]# glance  image-list
8 o& [( d4 s7 ], i% u4 H) Y6 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.8 _# y" {, H6 H- ]- q
  from cryptography import utils, x509
" ?4 _* @: Q/ M) M! ninvalid syntax (_pmap.py, line 98): c5 W/ `% b! u: ]3 n8 M( ]; }! F: }

1 ?* Z# M( I  [. D[root@controller1 src]# glance image-list* L/ [+ o1 a' M; _
/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.! n4 @% t" Q9 `' @+ |! j+ h3 F) p
  from cryptography import utils, x5090 L" f# M5 i$ _# `; G( B
invalid syntax (_pmap.py, line 98)8 w% A" |3 i$ y& w
[root@controller1 src]# vim /usr/lib/python2.7/site-packages/OpenSSL/crypto.py
; _; E( z) b/ ]9 O7 f8 V1 K. _2 Y* @) _3 b' U+ h# E' Q' C

8 s/ K% [# N% P' R9 Z: \; ]  @! P5 m  j9 b& O4 O  a, t
解决过程如下:! Q* Y9 Q+ w7 f: ~; f0 ], M3 w
+ R( q& \) d3 G5 X( ], y% g& Q
[root@controller1 src]# pip install -I utils, {  ^7 I* J0 E- f% t: Q! P
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/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
- G( X% ^: I" G0 K; j0 C& fLooking in indexes: http://mirrors.aliyun.com/pypi/simple/
9 Y/ g5 f5 v2 V0 eCollecting utils
: U, |2 p9 S5 x$ `- v' d6 S  Downloading http://mirrors.aliyun.com/pypi/packages/9b/de/9ffaf89be661b32d1e0cff05e1af5e4fc2d608c47498975e94aca219aed4/utils-0.9.0-py2.py3-none-any.whl (23 kB)' q5 ~" h$ l9 _) Q
Installing collected packages: utils7 {- w* v# b" }
Successfully installed utils-0.9.02 C: h/ V7 \( s& ]7 H  N( F0 L
[root@controller1 src]# pip install -I cryptography! }5 X8 D" z/ D3 }4 H3 c1 f% F5 U# k  g' d
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/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.# }  f" l8 Y* Z9 W+ G- ~* o0 y
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/5 ^0 C/ _  x+ `5 p
Collecting cryptography
  [0 _% c: F/ S( v2 s  Downloading http://mirrors.aliyun.com/pypi/packages/bf/a0/c630e9e3b7e7ea2492db1ca47ef7f741ef1a09f19c6642ef1a16ce996d9b/cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)
3 T% i$ ]5 ]8 w; U     |████████████████████████████████| 2.6 MB 607 kB/s
# w. b! z3 W7 l0 k/ y- S" i( M. H5 tCollecting six>=1.4.13 s# t7 [- E8 Z  v' l: ~
  Downloading http://mirrors.aliyun.com/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)" p5 [5 l9 X0 [2 @0 x0 z
Collecting cffi>=1.12
* ^( t- P3 S0 o$ D% \6 R" l- _  Downloading http://mirrors.aliyun.com/pypi/packages/74/f5/f0cb35e78044bf19309e635b20550bf3443322e0ff2ff09e6732c0ed0851/cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl (389 kB)
! @9 @# W$ {6 \) g1 V2 c     |████████████████████████████████| 389 kB 658 kB/s
2 L8 p. e/ Q( @9 |Collecting ipaddress; python_version < "3"
/ y) m" r: h6 k# R( a+ I. ~  Downloading http://mirrors.aliyun.com/pypi/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)- v4 s; \1 }% z2 g% ]' Z% T. Q0 m
Collecting enum34; python_version < "3"( c: S% x0 U3 {- U- d/ @
  Downloading http://mirrors.aliyun.com/pypi/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl (11 kB)
* ~- @# l9 P% A- X- k9 I) [( UCollecting pycparser, R/ h8 P2 S) c1 a3 Z6 {! }. r; k
  Downloading http://mirrors.aliyun.com/pypi/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112 kB)
2 G) y! {4 z# B9 u) a# \* u     |████████████████████████████████| 112 kB 660 kB/s $ ?, W0 f8 {( i3 l- |
Installing collected packages: six, pycparser, cffi, ipaddress, enum34, cryptography3 ?1 L1 e8 ]8 \# u1 b* q7 [; J& T
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
" A9 @% j* I( c, Q% X. ]4 o) s[root@controller1 src]# glance image-list, d% V( s  O& D4 }6 V* G3 w
/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.
' }" p& }+ H, p  from cryptography import utils, x5095 Q. c& c* I+ s0 p5 a1 M8 D
invalid syntax (_pmap.py, line 98)7 ]- F# J* v0 J0 b  ?
[root@controller1 src]# yum provides cryptography  c/ _& x7 ?' E4 z. w
Loaded plugins: fastestmirror
, r! L0 K3 f  V2 [5 iLoading mirror speeds from cached hostfile
. }5 U) U9 g- F4 t; Z( Z * base: mirrors.tuna.tsinghua.edu.cn
+ D) _$ u' E" }$ K; h- {; z * epel: mirrors.tuna.tsinghua.edu.cn/ S! J! p, R6 Q  s' p
* extras: mirrors.tuna.tsinghua.edu.cn
5 W* u- r* _9 i! V3 j# _9 U' r) j9 [ * updates: mirrors.tuna.tsinghua.edu.cn
; m/ m( Q& F; Q6 _, X4 f' \python2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library
. _  h# B* q* r/ d9 t, q" ^Repo        : base4 J. G& L0 {, j1 I: k! i
Matched from:
& O8 [# ^3 ~" I! K( gFilename    : /usr/lib64/python2.7/site-packages/cryptography4 W7 D- m+ _6 O  P. i  w! d8 B. y
# b& n3 z/ R1 D7 U) J) C! b
python2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library8 G: _$ ^* R1 R8 K$ p  |0 ^
Repo        : c7-media8 `+ @) p: `; |  i* e
Matched from:
" N: i6 x/ B' U% V! MFilename    : /usr/lib64/python2.7/site-packages/cryptography4 a7 X! D5 A# e+ F5 x: O! X
! E- ?$ T3 r* _: L
[root@controller1 src]# yum install -y python2-cryptography-1.7.2-2.el7.x86_64
4 \* V+ A3 s) H3 ^' SLoaded plugins: fastestmirror
& C8 T5 ?. X  }' t* ]Loading mirror speeds from cached hostfile
3 x7 |4 D2 L6 x/ k% jepel/x86_64/metalink                                                                                                                        | 6.7 kB  00:00:00     
8 C9 \3 x$ {1 s  C3 B * base: mirrors.tuna.tsinghua.edu.cn
4 ^- g1 ]4 f( ]# P+ s, b( S * epel: mirrors.tuna.tsinghua.edu.cn
# j1 U3 b/ D' z+ ? * extras: mirrors.tuna.tsinghua.edu.cn* G; b/ K) q! b3 C( o, B7 Z
* updates: mirrors.tuna.tsinghua.edu.cn
* y  z7 V4 c% W1 W7 m$ P/ R- ~& Cbase                                                                                                                                        | 3.6 kB  00:00:00     ( [5 ]9 }2 w2 M( f8 C" R6 Z8 r
c7-media                                                                                                                                    | 2.9 kB  00:00:00       z1 b) u  Z# x' S" F
ceph                                                                                                                                        | 2.9 kB  00:00:00     9 j& R( n( {. {' E' K' A1 R
docker-ce-stable                                                                                                                            | 3.5 kB  00:00:00     
9 s: t$ O# o+ c1 [- @" I, T) o, i: z. M1 j' i8 x
 楼主| 发表于 2021-8-13 17:41:36 | 显示全部楼层
[root@controller1 src]# glance image-list --debug7 @, g; l# H1 g6 M
Traceback (most recent call last):
8 q  \$ ^( R+ Z7 o2 _! r  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main0 N4 O9 L) X; v- e3 X( h
    OpenStackImagesShell().main(argv)8 Q) I, S) t8 h
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main* d& n+ E' Q) O) T2 ?9 h
    sub_parser = _get_subparser(api_version)2 ^) N% T# x2 ~% e% D  K- W8 G
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser; a" o$ T- B0 e7 q/ v
    return self.get_subcommand_parser(api_version, argv)# L  u' k7 l& c8 a
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser
, A7 p% x  o3 [    version, 'shell')* O& d5 m% R- W; J( m5 }& d
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module
6 h" n+ Z( c  G& R    return import_module(module_str)1 y& q/ t, s( L
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module
6 `' O. a  j3 j& W! i- S    __import__(import_str)
* p! Z$ E. b% d3 I& s  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>
& S) A5 H, ~4 }2 @    from glanceclient.v2.client import Client      # noqa& F: Z8 {- ]2 a  j# S
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 17, in <module>
; D9 h) ~) y7 ?1 \5 o    from glanceclient.common import http
! U$ O" Z; [7 m9 c  ?: J$ U  File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 22, in <module>
8 P$ ]4 W& f2 t& h    import OpenSSL
4 {: F, W+ W( C) L6 w/ k$ N  File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
; U& }8 k4 O3 t' K$ M/ N    from OpenSSL import crypto, SSL6 z: z2 y- |7 y  ?' o8 }
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 14, in <module>0 f$ z  q, @& i" {% X( N. }9 y3 _- q
    from cryptography import utils, x509" h( H; O7 ^: V& A
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/__init__.py", line 7, in <module>
$ I! N: m' O# [    from cryptography.x509.base import (3 @) q$ D2 b5 E% S- o& q* H, Z* \
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py", line 16, in <module>: d' O- E1 c% ^+ _
    from cryptography.x509.extensions import Extension, ExtensionType
* x8 N8 [# T# ^* q( r' X  File "/usr/lib64/python2.7/site-packages/cryptography/x509/extensions.py", line 20, in <module>7 U3 Y7 a  ^1 z/ \4 J9 [+ w
    from cryptography.hazmat.primitives import constant_time, serialization
! b3 O: r8 A3 r* I9 ^0 a) C  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
5 B9 P1 b& t9 d. J    from cryptography.hazmat.primitives.serialization.base import (
" [; e; \0 q/ O" K) Q& Z) A0 {. l  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 13, in <module>
8 s9 v- Z0 E6 ~9 U' |) s6 A    from cryptography.hazmat.backends import _get_backend$ [: F6 G8 ~# I
ImportError: cannot import name _get_backend3 s, I. F! j# L) j& ]. W
cannot import name _get_backend
) l  R8 o' \1 {2 e/ [, C2 Q: N  f0 s% w7 Y4 l# c% t
安装下面包:
3 t0 n; G2 y8 ]& d  W7 Y- [pip install -U platformio
8 \  b$ Y9 r$ x+ C5 x8 G
 楼主| 发表于 2021-8-13 17:50:30 | 显示全部楼层
[root@controller1 ~]# pip install -I cryptography
8 e, A  Q+ C, G+ X/ Y+ r/ ], zDEPRECATION: 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.
( A# D2 u' m9 A# ~, WLooking in indexes: http://mirrors.aliyun.com/pypi/simple/+ K2 q3 |% v9 }: }: B7 Y. z' ^' L
Collecting cryptography2 x3 f9 s  T0 J) G
  Downloading http://mirrors.aliyun.com/pypi/p ... inux2010_x86_64.whl (2.6 MB). u: r' Z1 \) j+ H  u5 ~+ \! L* ~
     |████████████████████████████████| 2.6 MB 303 kB/s ) R" f9 }# N, ]( ?6 o& u, [* C
Collecting cffi>=1.127 i( C) l2 X+ p0 f5 ^
  Downloading http://mirrors.aliyun.com/pypi/p ... nylinux1_x86_64.whl (389 kB)
) v9 s; Z' Y1 y" Q0 A     |████████████████████████████████| 389 kB 267 kB/s
+ B' K6 E0 ]. `7 _+ aCollecting six>=1.4.1
, \* m' ]3 r1 i7 F  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (11 kB)+ J% O. Q. |2 x' @; f5 \" U/ K7 ]
Collecting ipaddress; python_version < "3"
3 B3 j  @& Q6 I! D' l- i  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (18 kB)" r: v9 u( E) Y% \# I, w
Collecting enum34; python_version < "3"  _1 X. ?1 r3 C* {
  Downloading http://mirrors.aliyun.com/pypi/p ... 10-py2-none-any.whl (11 kB)
5 Y6 g+ s: V* b3 M2 w5 gCollecting pycparser( O; o& G) i/ n# [2 J) `
  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (112 kB)! S2 d& L' m0 L' Q
     |████████████████████████████████| 112 kB 414 kB/s
! U0 W) ]( k) ?Installing collected packages: pycparser, cffi, six, ipaddress, enum34, cryptography
& W8 w* z- _' T0 L& hSuccessfully installed cffi-1.14.6 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.20 six-1.16.0
  M! r& @& g# _[root@controller1 ~]# glance image-list --debug
8 `+ s# ^2 G( x2 [/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.: {+ k8 x) t/ _* r& d  l; Y
  from cryptography import utils, x509
) N6 p- \2 w# E0 }Traceback (most recent call last):- Z/ p$ u5 u8 ], \0 A1 S7 s
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main! H4 P- A* J4 o- U8 O# `& W: S( ^
    OpenStackImagesShell().main(argv), H1 u: A+ l5 t  N
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main
6 i! D0 j' J1 E    sub_parser = _get_subparser(api_version)! M4 ?" O% _8 h
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser% G( B0 i% a  ~, t
    return self.get_subcommand_parser(api_version, argv)
: b5 l" _6 o; b( \  Z. N1 x# O  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser. Q+ o, M) Y$ m' v8 |, e( Q+ r3 b
    version, 'shell')6 b" S4 W0 C& X5 o
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module+ h. ~6 J1 o: @3 K
    return import_module(module_str)
; i6 Q: j0 K$ @" l5 Q) @  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module
  ~* L# C# X$ N# ^    __import__(import_str)
5 F9 T! a6 s6 ^# c* P6 K  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>" g& _5 q5 J- W+ T9 ~. y
    from glanceclient.v2.client import Client      # noqa
* N: z1 V3 O4 \# h$ g  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 19, in <module>
- H- ^9 C' ~3 @2 F4 X    from glanceclient.v2 import image_members
% ]3 @) J% Y! E. q! z$ V# O  File "/usr/lib/python2.7/site-packages/glanceclient/v2/image_members.py", line 16, in <module>
9 W# o2 n& w. y& M# e    import warlock/ y5 ^% e4 D" r7 u
  File "/usr/lib/python2.7/site-packages/warlock/__init__.py", line 17, in <module>; [5 B$ F, Y% E5 U+ t1 v3 m+ K) q
    from warlock.core import model_factory  # NOQA
& Z! |: \5 o1 O# L" U+ z  L2 a  File "/usr/lib/python2.7/site-packages/warlock/core.py", line 19, in <module>
: m9 }1 Y# ~0 l( A% c8 [    from . import model; E+ q5 D- z0 N
  File "/usr/lib/python2.7/site-packages/warlock/model.py", line 21, in <module>
5 `/ A  @! [3 s    import jsonschema
# x  v, u& ~) e, d! x; ~" a  File "/usr/lib/python2.7/site-packages/jsonschema/__init__.py", line 21, in <module>6 K4 d. H3 \4 K7 o( e# B
    from jsonschema._types import TypeChecker. R8 P# M: B3 t( ^( K( R" n9 z$ X
  File "/usr/lib/python2.7/site-packages/jsonschema/_types.py", line 3, in <module>* X+ X* Z3 U( v  [3 y1 @) w/ g% j
    from pyrsistent import pmap
$ `& h7 u3 X- S  File "/usr/lib64/python2.7/site-packages/pyrsistent/__init__.py", line 3, in <module>
5 {8 r0 A% L0 l! y    from pyrsistent._pmap import pmap, m, PMap: W7 S7 e1 L+ U* i% `- b
  File "/usr/lib64/python2.7/site-packages/pyrsistent/_pmap.py", line 98
! `# t. t  C- b# ]- K/ x6 o    ) from e
( C% T" [6 ^4 ~         ^
. x) G3 ~# D: JSyntaxError: invalid syntax- n' H& X$ q' n
invalid syntax (_pmap.py, line 98)2 Z# J8 O* ~& c2 ?
[root@controller1 ~]# openstack image list
" w2 P) q& k, ^# y* K: {) K7 v' v% O+--------------------------------------+----------------------+--------+; u# _( W8 F; m5 i% v: _( h
| ID                                   | Name                 | Status |' I  ^$ @* r8 O, u; O
+--------------------------------------+----------------------+--------+
: q6 |' V! A$ W! O2 E) E$ r| d25d8b59-dfff-4f2b-b63e-aa22dc533778 | centos7.9-origin-hdd | active |/ K6 f9 P0 }* q* b
+--------------------------------------+----------------------+--------+
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 23:47 , Processed in 0.108167 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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