virtualenv中解决报错:ImportError: No module named Cryptodome.PublicKey
其中:2env为使用virtualenv创建的虚拟环境, lianxi目录为我已下载好各类的离线库包(按自己的使用需要去下载),ceshi3.txt是我本次想要安装的库列表
(2env) [root@xxxx]$ ./2env/bin/python wsgi.py
[warning] no local config file
Traceback (most recent call last):
File "wsgi.py", line 12, in <module>
from rrd import app
File "/xxx/rrd/__init__.py", line 36, in <module>
from view.auth import auth, oidc
File "/xxxx/rrd/view/auth/oidc.py", line 17, in <module>
from client import OidcClient
File "/xxxx/rrd/view/auth/client.py", line 17, in <module>
from jwkest.jwk import KEYS
File "/xxxx/2env/lib/python2.7/site-packages/jwkest/jwk.py", line 11, in <module>
from Cryptodome.PublicKey import RSA
ImportError: No module named Cryptodome.PublicKey
解决办法:
单独部署:pycryptodomex==3.8.2
pip install --no-index --find-links=qin -r ./ceshi3.txt --target=2env/lib/python2.7/site-packages
Ignoring indexes: https://pypi.python.org/simple
Collecting pycryptodomex==3.8.2 (from -r ./ceshi.txt (line 1))
Installing collected packages: pycryptodomex
Successfully installed pycryptodomex