找回密码
 注册
查看: 2960|回复: 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
3 w, j* Q, d% r. A8 ~( E+ 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.
6 k# s' U( F1 q  from cryptography import utils, x5095 z7 q# q1 f. O6 Y% e$ J: ]3 T
invalid syntax (_pmap.py, line 98)
5 U8 @$ l9 {/ a6 a/ H2 ?; M0 I- U. @9 i( c+ E0 K
[root@controller1 src]# glance image-list1 g$ S- {8 j1 f8 f, Y7 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.* \1 e5 Q, _) j+ f; Y+ e+ z
  from cryptography import utils, x5092 R" n( W$ c7 A5 T7 N
invalid syntax (_pmap.py, line 98)8 x2 A# d4 ^9 s" Z
[root@controller1 src]# vim /usr/lib/python2.7/site-packages/OpenSSL/crypto.py2 B* ^7 R) I: s4 v/ L

& x  J- a2 g( ?( e
  |0 O: O; y8 f8 ?; W
2 u% k3 U* L* g$ k# I4 l9 z解决过程如下:
7 a% o2 }5 Z/ a! }/ o2 j7 }  s
  U- d6 j& v, Z6 ]* h- N* |. _. K1 R' V[root@controller1 src]# pip install -I utils, B0 I8 J  n: b1 M7 h' k! ?
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.
( T+ n1 C4 G; }! s. lLooking in indexes: http://mirrors.aliyun.com/pypi/simple/
. I( Q5 R) @1 G( |# wCollecting utils% J) M" Z4 W; ?
  Downloading http://mirrors.aliyun.com/pypi/packages/9b/de/9ffaf89be661b32d1e0cff05e1af5e4fc2d608c47498975e94aca219aed4/utils-0.9.0-py2.py3-none-any.whl (23 kB)' P+ K3 ]% Q/ {0 U& P% E6 G8 X4 n
Installing collected packages: utils
5 w% i1 E# X7 \# rSuccessfully installed utils-0.9.0
" W/ P7 v) H) v, H[root@controller1 src]# pip install -I cryptography8 [+ H# J* S5 j4 {2 N# L7 A& z
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.) w% O/ M" R+ e; M5 [" o$ ?+ ]' i; [
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/" ?; z% l6 l. ~1 b" k: M2 d
Collecting cryptography
+ g3 P( W) L# r' e4 a7 k; T8 d& C  Downloading http://mirrors.aliyun.com/pypi/packages/bf/a0/c630e9e3b7e7ea2492db1ca47ef7f741ef1a09f19c6642ef1a16ce996d9b/cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)! U: Q2 z' A. N7 ^
     |████████████████████████████████| 2.6 MB 607 kB/s
1 L+ o! [- x. k! K8 x- hCollecting six>=1.4.12 y! m; s; U; o
  Downloading http://mirrors.aliyun.com/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)1 ~6 x; j' ]. c# b! l% {  E. ?
Collecting cffi>=1.12. \: [1 m) t+ t% h
  Downloading http://mirrors.aliyun.com/pypi/packages/74/f5/f0cb35e78044bf19309e635b20550bf3443322e0ff2ff09e6732c0ed0851/cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl (389 kB)- l3 L0 b/ n) @  f
     |████████████████████████████████| 389 kB 658 kB/s
( u# o8 R! P9 e- ^# l# yCollecting ipaddress; python_version < "3"
6 p- m. }: A: b- ?2 k  Downloading http://mirrors.aliyun.com/pypi/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)4 h- F3 ~+ s9 v& t4 c3 N6 X% Z# b
Collecting enum34; python_version < "3"9 Y0 d4 w$ f7 e9 I* @$ ]  V1 B
  Downloading http://mirrors.aliyun.com/pypi/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl (11 kB)
/ x$ d* u1 F; A5 V* hCollecting pycparser
, ~% C. {" `: G* k5 X) w+ J  Downloading http://mirrors.aliyun.com/pypi/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112 kB)
" v; ?- K& N3 j2 F- E+ D     |████████████████████████████████| 112 kB 660 kB/s $ w3 Q6 n2 K* [5 f2 v7 }/ d+ ]
Installing collected packages: six, pycparser, cffi, ipaddress, enum34, cryptography
$ R2 f) R( g1 j/ V) n8 H; G: sSuccessfully installed cffi-1.14.6 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.20 six-1.16.0
6 ]% Q; ]! C4 `3 l[root@controller1 src]# glance image-list5 p" |4 V, p% g1 i# L4 p/ o. k
/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- r/ i8 L0 w3 n3 T8 W
  from cryptography import utils, x509
# k7 [+ y( I9 k7 l9 ~invalid syntax (_pmap.py, line 98)
! _: I0 `: {% W7 a/ A[root@controller1 src]# yum provides cryptography: J8 x; u7 Z: c( H' c+ }: Q( r6 e
Loaded plugins: fastestmirror
, l: Z( K1 m! hLoading mirror speeds from cached hostfile1 ?; |: J2 V2 Q1 A+ l! I2 m
* base: mirrors.tuna.tsinghua.edu.cn
7 V& M" b% ~5 p& v4 a2 c * epel: mirrors.tuna.tsinghua.edu.cn$ V& A: j, {1 s# t5 G
* extras: mirrors.tuna.tsinghua.edu.cn
+ V; X/ V7 B% Z * updates: mirrors.tuna.tsinghua.edu.cn9 T+ ~0 l$ A( B* J
python2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library
7 [8 Z- K- R* J1 ?6 V7 y# KRepo        : base* D- B. k" \# q  _
Matched from:
. V! h$ z8 k: Y4 Q" O( YFilename    : /usr/lib64/python2.7/site-packages/cryptography
/ d" `( J9 ^: H. Z( v( |
3 p* ~1 R2 H8 u; i4 Xpython2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library
  R- i  N" O; p7 q' A* dRepo        : c7-media6 G" D* m& B+ Q! }$ y7 c
Matched from:
) Z( J* s8 g% z/ C/ AFilename    : /usr/lib64/python2.7/site-packages/cryptography$ r! e  c! Q9 b$ @2 D$ Q5 E& W4 S

' L  [0 d1 `+ |6 ^7 b1 b[root@controller1 src]# yum install -y python2-cryptography-1.7.2-2.el7.x86_64
) G* L4 f4 ^+ Y3 ^Loaded plugins: fastestmirror
7 t- @; s( B; G# Z# @, w/ U8 LLoading mirror speeds from cached hostfile3 U5 [# K: O: l7 \* D
epel/x86_64/metalink                                                                                                                        | 6.7 kB  00:00:00     ' R, O# S3 p2 y+ O( }$ |- o$ d
* base: mirrors.tuna.tsinghua.edu.cn
2 W; {- A7 [" g) C7 M" I) z* \ * epel: mirrors.tuna.tsinghua.edu.cn
8 _4 Q& a0 K% z- E! { * extras: mirrors.tuna.tsinghua.edu.cn
& b5 g7 s( }( n% C8 ~ * updates: mirrors.tuna.tsinghua.edu.cn
1 e& j: D9 N: u6 G6 x1 V1 Tbase                                                                                                                                        | 3.6 kB  00:00:00     4 F, {% e! h' |0 J6 X9 f
c7-media                                                                                                                                    | 2.9 kB  00:00:00     
9 Y- S6 O# R% I; v! v# A& Oceph                                                                                                                                        | 2.9 kB  00:00:00     
( W6 E- J, k' i, Y- ddocker-ce-stable                                                                                                                            | 3.5 kB  00:00:00     : Z& f# k- T7 J% Y& Z  G, X

$ _& _+ `1 v6 z: ]& B

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-13 17:41:36 | 显示全部楼层
[root@controller1 src]# glance image-list --debug6 J( g( |* R/ u$ J" X. L
Traceback (most recent call last):
! ?: l7 Z) d$ v+ g4 s  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main
0 G9 U* K3 s) T  g0 q% G: P    OpenStackImagesShell().main(argv)
7 r! |8 }$ \8 k  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main
" J8 j7 t% m( A    sub_parser = _get_subparser(api_version)
$ N8 H1 Q8 W3 Z+ ?" g, }; s- x  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser
. G; ]6 g0 [, h. U    return self.get_subcommand_parser(api_version, argv)
6 @/ i1 V/ c: m6 ?: l1 g# k  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser
' k  v- O! T# Z; M- H) E, w7 f. d5 a    version, 'shell'). j9 {" o3 N% L
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module: n- g' l7 }3 v
    return import_module(module_str)
, a/ A5 [2 E, A* ~: v3 @  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module# j; I! g. R+ {" a6 W3 L
    __import__(import_str)
! z0 X- S/ e3 s: s% n  z' i/ N6 C# s9 o2 B4 J  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>4 k4 W, J5 C  n
    from glanceclient.v2.client import Client      # noqa
3 m- P. p  p) N7 k- Z% p  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 17, in <module>- k% x$ X1 ^9 v. L* q: t
    from glanceclient.common import http
8 P& Y* d) B% l; h# _) g1 n& u  File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 22, in <module>5 d) A, O- v: R, R% z& ~
    import OpenSSL' I% p- `5 ^* P; K# m' c
  File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>2 s* }5 r7 O; a+ c
    from OpenSSL import crypto, SSL% z& m8 v: }, A& o) m: S; b2 m
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 14, in <module>
5 k& X+ h4 E* f$ [4 l% j    from cryptography import utils, x509
9 D5 r5 p2 \; E* [3 y' ]9 P  File "/usr/lib64/python2.7/site-packages/cryptography/x509/__init__.py", line 7, in <module>% O' u9 U  b( b4 |
    from cryptography.x509.base import (6 u* @; h" }- J5 l" _* s# d6 S
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py", line 16, in <module># ^$ ^3 x% R" e7 V
    from cryptography.x509.extensions import Extension, ExtensionType
$ v1 C( Z0 v7 {5 i4 d/ _6 Y3 M2 A  File "/usr/lib64/python2.7/site-packages/cryptography/x509/extensions.py", line 20, in <module>
" I1 t- f  a: R+ x8 ?9 M* {( B, U    from cryptography.hazmat.primitives import constant_time, serialization
3 ]) `$ U/ Y8 O$ i% w. p+ j  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
1 d2 w# D0 f. o  F    from cryptography.hazmat.primitives.serialization.base import (
7 e' Y. _4 \/ B  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 13, in <module>$ H( x; D$ ]7 r) G7 Q3 i! v& H
    from cryptography.hazmat.backends import _get_backend
8 G2 |* m4 _: D5 p/ z) zImportError: cannot import name _get_backend
$ Q& E! Q6 }; @; Y8 O/ F, Scannot import name _get_backend
/ [# a$ i: y4 B; i
. c( [2 X& _1 I. V7 G' X$ S  T) V安装下面包:% \# d3 y0 J3 \8 [9 _9 q$ v7 A
pip install -U platformio. S9 @4 o% C1 _! R1 g' x& Q5 ~

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-8-13 17:50:30 | 显示全部楼层
[root@controller1 ~]# pip install -I cryptography
$ p; M( G! X* PDEPRECATION: 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.
# b- \" p+ U; Z2 E! \2 L- TLooking in indexes: http://mirrors.aliyun.com/pypi/simple/* l. S2 H3 d4 A8 l% i
Collecting cryptography2 i& I7 Q: w" B+ A3 {
  Downloading http://mirrors.aliyun.com/pypi/p ... inux2010_x86_64.whl (2.6 MB); D; Z+ e+ B0 M# }6 d0 R
     |████████████████████████████████| 2.6 MB 303 kB/s ' W; d' n* D1 Q! f: \
Collecting cffi>=1.12
' g- X2 ]' O0 Q8 _, t4 E  Downloading http://mirrors.aliyun.com/pypi/p ... nylinux1_x86_64.whl (389 kB)
" A% V1 E  ]! K  r, x3 t: e0 R     |████████████████████████████████| 389 kB 267 kB/s " c/ G# J6 q2 B' W8 U
Collecting six>=1.4.1
" W( [3 v& X7 ~. A4 I  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (11 kB)) Z2 q  p* V# N- m
Collecting ipaddress; python_version < "3": J1 ?# b$ i! A5 k+ m- ]# f5 {  v/ }
  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (18 kB)# c% C. S# |" j( T
Collecting enum34; python_version < "3"9 D' l& J, E. @' V
  Downloading http://mirrors.aliyun.com/pypi/p ... 10-py2-none-any.whl (11 kB)
7 Z* c7 s4 R2 a/ n5 z3 i! ~Collecting pycparser
9 U* u* g9 `6 @) Q) I4 u& H0 L9 @  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (112 kB)
- Q) s2 C' D/ J  J. r4 [2 Q     |████████████████████████████████| 112 kB 414 kB/s
  I7 C3 y* [0 Y: XInstalling collected packages: pycparser, cffi, six, ipaddress, enum34, cryptography3 T$ ?3 o- K6 u7 o8 O& w; T  G
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* \3 |1 j2 P6 _" |( C, p
[root@controller1 ~]# glance image-list --debug
+ M) B4 A0 u  D8 E8 {8 D( b# z! J/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.
, }# Y7 Z! I5 @4 }8 }* b& S% Q8 T/ N  from cryptography import utils, x509
& f  J# C- N$ X2 K" a9 e4 sTraceback (most recent call last):; O8 n/ ^4 |" ~0 N* f  Z/ p' a
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main
. z; @4 p7 S0 [    OpenStackImagesShell().main(argv)
: C0 P, o- F3 R6 c5 A  _% w7 y3 w  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main! F" b' z# e1 Q7 m3 u6 ^
    sub_parser = _get_subparser(api_version)
4 a9 k$ C) p% m  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser
4 c+ f1 a& [! M+ N" H4 n    return self.get_subcommand_parser(api_version, argv)- k$ @; O1 D* L1 ?3 d
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser6 R4 g/ H) U0 R# [0 l
    version, 'shell')
/ \; Z3 o) i2 \  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module
2 o; t# P# M/ d  t    return import_module(module_str)% e! n: b/ i9 L. q8 i# v, C5 A
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module
1 ^4 L& L7 h6 L/ [& q    __import__(import_str)0 l" |+ y4 T- X" j1 V
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>. ?/ O/ ]) x9 @5 E% e
    from glanceclient.v2.client import Client      # noqa
+ C% |- ]' n- p, D- S! H2 Y8 K  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 19, in <module>' m  H6 t8 H3 w" q! |' g
    from glanceclient.v2 import image_members0 S1 ~; m* L2 z# i7 `8 {
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/image_members.py", line 16, in <module>
% O) y/ P6 c' d' i9 r    import warlock( w& `( ?( ~8 _# g* w7 P
  File "/usr/lib/python2.7/site-packages/warlock/__init__.py", line 17, in <module>9 V1 g3 |! V7 v, g2 ^" Z# z3 s
    from warlock.core import model_factory  # NOQA
- N3 ?$ C5 P* |7 I# Q, H; g) J4 [  c  File "/usr/lib/python2.7/site-packages/warlock/core.py", line 19, in <module>: L% _  q% s$ i: E4 N! N! _3 a
    from . import model
& w  \8 c( f2 S7 j% u  File "/usr/lib/python2.7/site-packages/warlock/model.py", line 21, in <module>
8 l6 D$ |9 [- X* b8 v- R    import jsonschema, i( x$ W/ l( U: n
  File "/usr/lib/python2.7/site-packages/jsonschema/__init__.py", line 21, in <module>
, m' j4 b" z, [/ G( h$ V& `9 H    from jsonschema._types import TypeChecker
9 b& W: ^' n& {& o  File "/usr/lib/python2.7/site-packages/jsonschema/_types.py", line 3, in <module>/ Z# `' R7 l7 d. L, K- ^
    from pyrsistent import pmap. X5 T  j; K5 [2 L5 J6 v' ?* z' ?+ p( b
  File "/usr/lib64/python2.7/site-packages/pyrsistent/__init__.py", line 3, in <module>  R) `* t2 n' C9 ~4 g
    from pyrsistent._pmap import pmap, m, PMap4 ?/ z( c0 q* k& q/ D$ @4 x
  File "/usr/lib64/python2.7/site-packages/pyrsistent/_pmap.py", line 98) L" Y3 X9 F8 L( q+ G1 R
    ) from e
& H5 f, H8 b+ t2 H         ^" {! n& S) @6 }2 G+ Z0 v
SyntaxError: invalid syntax  p7 z1 a0 _- I. a
invalid syntax (_pmap.py, line 98)
8 Q7 t6 y. t) U2 r  h* T) }[root@controller1 ~]# openstack image list
0 v# k4 Z; D' i* z' J+--------------------------------------+----------------------+--------+& f, ?5 S1 t' _1 S5 L
| ID                                   | Name                 | Status |
$ H1 s0 K, H! \# v0 x+--------------------------------------+----------------------+--------+
/ `& U1 X+ g! |4 _6 H| d25d8b59-dfff-4f2b-b63e-aa22dc533778 | centos7.9-origin-hdd | active |
9 R# i. u) ^4 z9 x' |+--------------------------------------+----------------------+--------+
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:05 , Processed in 0.017695 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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