易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 2963|回复: 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 ?" |( `. o8 g2 {! A/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.4 A* T/ e0 \1 u. S
  from cryptography import utils, x5090 Y% V. H! z) U4 b
invalid syntax (_pmap.py, line 98): y6 ~1 a+ @" |& Q) A! e0 d; {
* c! b2 N9 w9 j6 l- c9 h
[root@controller1 src]# glance image-list
" ]2 ~, Z6 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.# i, ^' D8 q. G# m1 l
  from cryptography import utils, x509
; L4 r3 c& j; F$ z" oinvalid syntax (_pmap.py, line 98)- o; k% r. p8 E
[root@controller1 src]# vim /usr/lib/python2.7/site-packages/OpenSSL/crypto.py3 J2 p. A; }/ Y* X+ L
6 F. F6 h+ I# D2 P. D# \2 r
5 Y  X' s7 j% b/ p; l; r! k) s
5 Q0 |9 H) R  Z7 s. W) s( R
解决过程如下:0 g6 O& ?- Z( ~8 y
$ I  M# v9 q( k5 x
[root@controller1 src]# pip install -I utils
6 \: M5 N8 W2 y  d; G2 h/ TDEPRECATION: 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.
& O7 m6 \1 j( J6 x$ m7 |/ s) ?  QLooking in indexes: http://mirrors.aliyun.com/pypi/simple/7 d" j  N9 R& s
Collecting utils. H2 t! _8 ~4 n8 w0 v: i2 O
  Downloading http://mirrors.aliyun.com/pypi/packages/9b/de/9ffaf89be661b32d1e0cff05e1af5e4fc2d608c47498975e94aca219aed4/utils-0.9.0-py2.py3-none-any.whl (23 kB)
3 I9 Q- B' q; P+ n$ VInstalling collected packages: utils
: k1 }  G7 p5 D; V. W8 k+ ESuccessfully installed utils-0.9.0* W3 w( _1 }( j+ d. h7 l
[root@controller1 src]# pip install -I cryptography" n( _# i8 g- m# 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.& ?' Q! ~# t) G  F) E' W! |
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/5 [4 h4 E: G$ v9 d5 a
Collecting cryptography/ Y+ }3 H& z% ^: b& ^
  Downloading http://mirrors.aliyun.com/pypi/packages/bf/a0/c630e9e3b7e7ea2492db1ca47ef7f741ef1a09f19c6642ef1a16ce996d9b/cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)
/ f( k: e$ C, o2 U     |████████████████████████████████| 2.6 MB 607 kB/s % s- J! K! ~, X, S: j+ |
Collecting six>=1.4.1
0 u* }: r$ z* E9 ]' V5 {2 e6 V: b  Downloading http://mirrors.aliyun.com/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
+ F! m; s) _: q5 FCollecting cffi>=1.12
1 V: c6 V; R0 a( B& ~  Downloading http://mirrors.aliyun.com/pypi/packages/74/f5/f0cb35e78044bf19309e635b20550bf3443322e0ff2ff09e6732c0ed0851/cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl (389 kB)# M2 C  h9 d/ z" R  V( c
     |████████████████████████████████| 389 kB 658 kB/s
1 _5 Z% n+ o3 \6 F0 {# E3 |, _Collecting ipaddress; python_version < "3"8 M  p( g2 a1 X8 n. Q2 x7 s! `
  Downloading http://mirrors.aliyun.com/pypi/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
" \" O, P$ Y2 B- z7 KCollecting enum34; python_version < "3"
4 n, X! J+ t4 d  u2 w9 X  Downloading http://mirrors.aliyun.com/pypi/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl (11 kB)7 q) f- h- e: d; o9 }4 s2 y2 f) _0 B
Collecting pycparser
! g; t" L1 {' p; g  Downloading http://mirrors.aliyun.com/pypi/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112 kB)
7 ^' }7 @6 Y! Y2 g, D     |████████████████████████████████| 112 kB 660 kB/s
* m' l& ?- Z- y7 ?Installing collected packages: six, pycparser, cffi, ipaddress, enum34, cryptography4 w3 G/ p$ ]6 O% Q$ y# r- S# B+ R
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
6 V/ m, ?9 ^+ g5 y4 d: U. x9 n[root@controller1 src]# glance image-list( u, a4 D/ c, V; E1 y$ Y( I' F
/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.$ s; V# h( s: X2 a
  from cryptography import utils, x5097 O2 I( o4 ]0 P! B; `1 K
invalid syntax (_pmap.py, line 98)6 y6 T& Q* D3 Q1 R1 P! }' f
[root@controller1 src]# yum provides cryptography
6 N# ]8 V; j% z* F1 n% u( eLoaded plugins: fastestmirror
0 Z1 M0 G; J3 f3 bLoading mirror speeds from cached hostfile: K+ B) Y/ `4 Z9 x: ~
* base: mirrors.tuna.tsinghua.edu.cn
  c2 N, Y/ w$ c  s * epel: mirrors.tuna.tsinghua.edu.cn
; P0 _- M" e) K& Z% o+ ?# N( x * extras: mirrors.tuna.tsinghua.edu.cn
/ q/ [4 h  i/ f3 n  N, | * updates: mirrors.tuna.tsinghua.edu.cn  @2 y6 q* \3 E
python2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library
/ N- d0 j4 |) B! A) }Repo        : base* C5 E6 s7 _9 N; a8 w
Matched from:! b$ P2 U+ ?# F; Y0 S9 O
Filename    : /usr/lib64/python2.7/site-packages/cryptography
' S# I# {+ E6 j: H7 o8 A
  L$ m( i+ z6 I7 M4 x1 {python2-cryptography-1.7.2-2.el7.x86_64 : PyCA's cryptography library0 e( ]4 _7 P5 H
Repo        : c7-media) y, t" q' A4 o. v# x
Matched from:+ A4 d0 C- Y" K) t9 J
Filename    : /usr/lib64/python2.7/site-packages/cryptography" p6 J! i3 V" b8 ?8 q* L, N& h

1 k  C+ u6 \3 f[root@controller1 src]# yum install -y python2-cryptography-1.7.2-2.el7.x86_64
% t7 |/ G+ U- J, e& gLoaded plugins: fastestmirror2 S: f& f& q  R; a
Loading mirror speeds from cached hostfile5 Z3 v/ c1 z: [3 @- i
epel/x86_64/metalink                                                                                                                        | 6.7 kB  00:00:00     
! r9 [  ?6 P7 D) S * base: mirrors.tuna.tsinghua.edu.cn# D# X1 a. w8 u6 a
* epel: mirrors.tuna.tsinghua.edu.cn9 G8 ]' F+ b6 M+ i, b
* extras: mirrors.tuna.tsinghua.edu.cn
9 K/ ^* w' u2 i * updates: mirrors.tuna.tsinghua.edu.cn, F5 ~0 t5 @% G- J! q3 \  c# W* h0 ]
base                                                                                                                                        | 3.6 kB  00:00:00     
! \9 j& j* B  x6 w; Hc7-media                                                                                                                                    | 2.9 kB  00:00:00     , w/ `: e6 r% k3 }" g( i% ^
ceph                                                                                                                                        | 2.9 kB  00:00:00     
& v  n! |9 N- F: t+ I" a1 rdocker-ce-stable                                                                                                                            | 3.5 kB  00:00:00     2 m0 j- |! v5 X

) Y& ^4 v/ |$ g& D& Y  e
 楼主| 发表于 2021-8-13 17:41:36 | 显示全部楼层
[root@controller1 src]# glance image-list --debug& j* K) r" k$ H# g  M2 T* \
Traceback (most recent call last):
1 h8 Y; ]7 w4 j1 P) M  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main
" M& c: @6 e9 S; \, ^    OpenStackImagesShell().main(argv)  ?& o4 g8 @. ^1 r
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main
: A1 r7 `$ {+ r7 c    sub_parser = _get_subparser(api_version)
0 {9 q6 j' v. {) Q# d0 s8 E' @  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser; e" F, \$ X$ [+ C$ \; g
    return self.get_subcommand_parser(api_version, argv)( J) ?! C) B/ L# ?6 C* n* Y
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser) F$ G) c6 z3 Q
    version, 'shell')
+ L" Z4 L* c3 f8 f$ U& Z. |: k: [  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module
- `8 x$ d: p/ X. w    return import_module(module_str)" P+ X1 ^- y7 s- Q/ @& Z" K9 L8 E, r6 {
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module' z' S7 v6 ?% j$ o" T2 J$ b
    __import__(import_str)
. d, k* Y, f% ~: ~' s, u) m  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>4 c9 s/ l* J& X9 R' o9 y3 \; m
    from glanceclient.v2.client import Client      # noqa
+ U  b$ g2 V% ~  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 17, in <module>
, C- \! r" T6 ?. l4 F! @2 E9 B, _    from glanceclient.common import http
/ L. _* q2 `- h8 b8 l% p  File "/usr/lib/python2.7/site-packages/glanceclient/common/http.py", line 22, in <module>
+ ^- r% h: i& T+ W    import OpenSSL
6 p7 Y4 Q' ?, s( ^! ]6 Y! }  File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>& T8 U% h- Y( T( A5 x+ T: }6 W
    from OpenSSL import crypto, SSL
- W! t" c! ?: W  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 14, in <module>
3 C* S! u1 B+ V, p. P    from cryptography import utils, x509% E4 y. [" L1 Q6 p' Q
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/__init__.py", line 7, in <module>- J6 b/ D2 g4 ~+ [2 R: j: o
    from cryptography.x509.base import (
8 @$ k* [5 @, N0 N- p  File "/usr/lib64/python2.7/site-packages/cryptography/x509/base.py", line 16, in <module>5 |" I/ l1 i% F  B/ J! G( [
    from cryptography.x509.extensions import Extension, ExtensionType- _/ S' u; @) N3 S
  File "/usr/lib64/python2.7/site-packages/cryptography/x509/extensions.py", line 20, in <module>
1 l9 @% w8 V! F2 e/ {5 _& R    from cryptography.hazmat.primitives import constant_time, serialization# ~1 m" f# j% G5 E* ^
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
" |: j7 k; t- ~) @3 Y+ \# {% ]    from cryptography.hazmat.primitives.serialization.base import (
" G) A- {" P3 L4 v& C0 G) G6 l9 Z' `! [  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 13, in <module>
! z% m' p1 A7 K; _; }9 l( h( U    from cryptography.hazmat.backends import _get_backend7 G- J) ^! d8 r
ImportError: cannot import name _get_backend
2 U! g" }! ?; _; s4 p9 V: h; Gcannot import name _get_backend( B1 e! V; n3 y2 O1 ]3 H$ f. B

: s, r2 w1 N0 e( a& f安装下面包:
7 K# k- S* X. G: C2 a) M4 t4 R6 gpip install -U platformio
% h& ~* O, i- g$ e0 x( h
 楼主| 发表于 2021-8-13 17:50:30 | 显示全部楼层
[root@controller1 ~]# pip install -I cryptography
. i+ {5 W+ T! h0 k5 p0 y$ \6 @5 w. 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/de ... s/#python-2-support pip 21.0 will remove support for this functionality." A6 }, D# I9 e- {. y. g! n
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
! J9 e( m0 b$ Q) z$ l9 R( t1 H: oCollecting cryptography
3 x1 h6 L8 ~( b  Downloading http://mirrors.aliyun.com/pypi/p ... inux2010_x86_64.whl (2.6 MB)
# u* y" ~8 k# H% _     |████████████████████████████████| 2.6 MB 303 kB/s . ]3 x6 p( q1 t" M
Collecting cffi>=1.12
% |& z  J( {0 k8 e% \  Downloading http://mirrors.aliyun.com/pypi/p ... nylinux1_x86_64.whl (389 kB)
' ^' d4 @, u* y1 ?- `     |████████████████████████████████| 389 kB 267 kB/s
. D6 C! R+ P4 O/ w# NCollecting six>=1.4.13 v! D0 N' E6 o: B  _' h" I" B  K, Q
  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (11 kB)$ ~: H, k' E! l$ m9 ]. e' _
Collecting ipaddress; python_version < "3"0 A- F7 v. d. J0 [2 x) r3 a: L9 M
  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (18 kB)
5 y# l4 P: L* z# H* G* L0 `Collecting enum34; python_version < "3"
" U2 C; \* k  z- Q  Downloading http://mirrors.aliyun.com/pypi/p ... 10-py2-none-any.whl (11 kB)
6 u* M; n7 [2 K( ZCollecting pycparser
" V6 D$ |$ M* U3 e7 O) _$ b  Downloading http://mirrors.aliyun.com/pypi/p ... y2.py3-none-any.whl (112 kB)2 D  F7 V/ f& R7 n9 R
     |████████████████████████████████| 112 kB 414 kB/s
! J0 ?7 s, ?& fInstalling collected packages: pycparser, cffi, six, ipaddress, enum34, cryptography% y' |1 n* w8 Q' w; E
Successfully installed cffi-1.14.6 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.20 six-1.16.02 F( C# {) _& G3 F
[root@controller1 ~]# glance image-list --debug9 J+ k8 B! Z6 Y' c% E5 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.
9 x. R) _$ W* v* d$ c6 k  from cryptography import utils, x5099 B0 ^2 Z4 w7 O  p- g
Traceback (most recent call last):- E$ s5 X0 P6 U2 ]  r; E' Q! G& M' S
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 687, in main" ~4 i1 ?" U/ ?, m. d. l
    OpenStackImagesShell().main(argv)
; s1 h, z( m8 ]1 x& C; L$ z3 u  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 532, in main% }3 C" r2 v( }. _3 }  k0 _
    sub_parser = _get_subparser(api_version)
% V- |) k2 A9 H  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 479, in _get_subparser% c' Z2 X: C% @7 O0 x4 b
    return self.get_subcommand_parser(api_version, argv)/ P) _% Q8 Z( J/ |) V3 }
  File "/usr/lib/python2.7/site-packages/glanceclient/shell.py", line 198, in get_subcommand_parser6 o  q- O- e8 e# ~2 z
    version, 'shell')$ J1 e& m1 L" Q9 W! d2 n" C
  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 97, in import_versioned_module9 B+ p/ y2 r5 R4 `5 u
    return import_module(module_str)
" t9 s5 p( U  j' D" i  File "/usr/lib/python2.7/site-packages/oslo_utils/importutils.py", line 73, in import_module
0 G2 k$ g  T4 D5 y2 P    __import__(import_str)
- P0 j9 Z. k7 a) f) o% {  File "/usr/lib/python2.7/site-packages/glanceclient/v2/__init__.py", line 15, in <module>
) B2 z" k6 {" l$ [2 c! w2 @; v! I    from glanceclient.v2.client import Client      # noqa& ~. o" |  @6 F# W* w5 f
  File "/usr/lib/python2.7/site-packages/glanceclient/v2/client.py", line 19, in <module>
3 p. y6 ~; D8 y# d, M! V    from glanceclient.v2 import image_members
/ x1 G: c( N: P& b6 T4 ]0 I  File "/usr/lib/python2.7/site-packages/glanceclient/v2/image_members.py", line 16, in <module># z8 n$ d. V( `
    import warlock
- y5 w4 ]7 k' K# m* b  File "/usr/lib/python2.7/site-packages/warlock/__init__.py", line 17, in <module>$ B1 a- o0 b; u! i) G2 P, J
    from warlock.core import model_factory  # NOQA) G) R9 w' B, x7 Y. @8 Y
  File "/usr/lib/python2.7/site-packages/warlock/core.py", line 19, in <module>
5 p# ~6 C1 E/ ]  J. M+ t# J/ r    from . import model
0 @0 l" o1 `; m) r9 w  File "/usr/lib/python2.7/site-packages/warlock/model.py", line 21, in <module>& T$ M9 `' W6 p' S
    import jsonschema% I: T6 z0 O. V; ~% I
  File "/usr/lib/python2.7/site-packages/jsonschema/__init__.py", line 21, in <module>
0 [. D& \+ E) G$ ~9 G    from jsonschema._types import TypeChecker
$ q) Q5 p* O, F: q' @  File "/usr/lib/python2.7/site-packages/jsonschema/_types.py", line 3, in <module>* H' u; \: }& K. c1 o
    from pyrsistent import pmap: e* m4 T1 C; m( ?+ W; [- r( a
  File "/usr/lib64/python2.7/site-packages/pyrsistent/__init__.py", line 3, in <module>" z! G7 Z5 b- z
    from pyrsistent._pmap import pmap, m, PMap$ M- R0 J0 {7 Y% b& w& \
  File "/usr/lib64/python2.7/site-packages/pyrsistent/_pmap.py", line 98
3 O8 Y( S3 Z/ i& j  O    ) from e
, U; |! w5 l9 N. w- i         ^
% [+ Z4 N/ V, a3 z& {2 iSyntaxError: invalid syntax
4 E* z2 ]6 O% |' @: U8 _invalid syntax (_pmap.py, line 98)
0 H0 H" [  ?# ^1 L[root@controller1 ~]# openstack image list
. g% n+ K7 p) B+--------------------------------------+----------------------+--------+/ F' H# r: Y1 n: A
| ID                                   | Name                 | Status |- X  E" ?) P$ l4 S
+--------------------------------------+----------------------+--------+
* S# Y( E  v0 ]) g- c4 q| d25d8b59-dfff-4f2b-b63e-aa22dc533778 | centos7.9-origin-hdd | active |$ T; v- a' [2 I# F; a# y. w: @! L
+--------------------------------------+----------------------+--------+
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 16:56 , Processed in 0.044612 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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