|
|
[root@openstack-gnocchi ~]# kolla-genpwd0 w, K6 \* ?5 I) M
Traceback (most recent call last):. k7 L5 ^8 _) U( r' `8 e
File "/usr/bin/kolla-genpwd", line 5, in <module># Z# l$ X# Z1 x/ K- n
from kolla_ansible.cmd.genpwd import main
2 n, x% ^! G/ Z! F* ^9 L; V File "/usr/lib/python2.7/site-packages/kolla_ansible/cmd/genpwd.py", line 24, in <module>5 x" X7 [- L- s
from cryptography.hazmat.primitives import serialization
* H( o. \$ o5 B. I8 Q- J File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
8 N+ t' w; N X/ E; L- w from cryptography.hazmat.primitives.serialization.base import (, C5 {. T {; [% U
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 13, in <module>
" Q" ?( z. V1 a7 X2 k from cryptography.hazmat.backends import _get_backend
' ~" j' c4 e2 P6 `0 xImportError: cannot import name _get_backend
# v0 M4 ?) p/ z8 n( L( j' n
2 d4 j9 e7 Q0 h: P& ?$ e解决办法:- T, M. y" P4 F% q7 ~
使用pip命令安装py1 T. U9 l; G2 }# O8 t7 n
[root@openstack-gnocchi ~]# pip install -I cryptography* b& {) K3 |% T
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.
. ?) l. a/ q7 A% \( u9 J4 TLooking in indexes: http://mirrors.aliyun.com/pypi/simple/
9 V# z% c" U, ^9 pCollecting cryptography
2 h3 G: q4 q7 L, m4 z4 e" z$ N Downloading http://mirrors.aliyun.com/pypi/packages/bf/a0/c630e9e3b7e7ea2492db1ca47ef7f741ef1a09f19c6642ef1a16ce996d9b/cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)
- T2 g! m/ N# ^6 C7 E) c# @ |████████████████████████████████| 2.6 MB 447 kB/s
, O2 Y9 V- t1 D4 yCollecting six>=1.4.1
8 I2 n: i3 @3 G* A9 W; X5 X' N Downloading http://mirrors.aliyun.com/pypi/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)- z" `+ ^0 W m8 x- R) U0 i
Collecting enum34; python_version < "3"# c* D: e3 Z: {9 H _
Downloading http://mirrors.aliyun.com/pypi/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl (11 kB)/ ]' m$ \1 O/ g
Collecting ipaddress; python_version < "3"5 V4 M" C$ r; x& B: p* ?. g( \
Downloading http://mirrors.aliyun.com/pypi/packages/c2/f8/49697181b1651d8347d24c095ce46c7346c37335ddc7d255833e7cde674d/ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)$ b4 e- {4 Y1 H% b8 ]3 t: s& m. Z
Collecting cffi>=1.127 V( S' J$ ~" s2 `! \+ I
Downloading http://mirrors.aliyun.com/pypi/packages/26/28/fb01ff898aa7c93e4774799b3dc0a3693cfee48c5ea4e524ce30e6b10e7e/cffi-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl (393 kB)
! k% u, g6 b9 Y# q! o' Y" B |████████████████████████████████| 393 kB 478 kB/s
7 a3 I+ K* w/ z( i5 pCollecting pycparser* D5 e6 u+ v1 g# U
Downloading http://mirrors.aliyun.com/pypi/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118 kB)0 I8 j$ S$ b# m& i) _
|████████████████████████████████| 118 kB 476 kB/s 4 _3 U+ p5 g, R, J* N3 T4 p; M! i
Installing collected packages: six, enum34, ipaddress, pycparser, cffi, cryptography
9 G$ E3 E( A, `% q4 t# m- ZSuccessfully installed cffi-1.15.0 cryptography-3.3.2 enum34-1.1.10 ipaddress-1.0.23 pycparser-2.21 six-1.16.0
/ u1 g( R! { W6 N. z: X[root@openstack-gnocchi ~]# kolla-genpwd/ S* y" s7 }) ~( F; \6 u/ l
/usr/lib/python2.7/site-packages/kolla_ansible/cmd/genpwd.py:22: 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 v! D" s% S* W" e+ Z from cryptography.hazmat.backends import default_backend# ]! {2 S; d& w: x* \0 a/ p' h: M% S0 \
0 h$ |5 E9 W1 R) t# {
6 i' O" g5 f% j O* t然后就又调到了这个问题上:; J) u& @' J; C/ p3 ^' Y
http://www.bbs168x.cn/forum.php?mod=viewthread&tid=2240&extra=
% l' X5 s: w; |! o7 ?
* v+ ?# E8 p5 E
6 _/ N& o+ f0 l& [5 M |
|