没有名为Crypto.Cipher Open EdX的模块

2024-06-10 23:13:16 发布

您现在位置:Python中文网/ 问答频道 /正文

试图将此代码导入我们的edx站点encrypt data in python,但它需要一个名为pycryptodome的包。已尝试使用以下方法安装它:

pip install pycryptodome

但每次我打电话都会显示一个错误

from Crypto.Cipher import AES

WARNING:enterprise.utils:Could not import Registry from third_party_auth.provider
WARNING:enterprise.utils:cannot import name EnterpriseCustomerUser
Traceback (most recent call last):
  File "./manage.py", line 120, in <module>
    startup.run()
  File "/openedx/edx-platform/cms/startup.py", line 19, in run
    django.setup()
  File "/openedx/venv/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/openedx/venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 116, in populate
    app_config.ready()
  File "/openedx/edx-platform/cms/djangoapps/contentstore/apps.py", line 22, in ready
    from .signals import handlers  # pylint: disable=unused-variable
  File "/openedx/edx-platform/cms/djangoapps/contentstore/signals/handlers.py", line 12, in <module>
    from contentstore.proctoring import register_special_exams
  File "/openedx/edx-platform/cms/djangoapps/contentstore/proctoring.py", line 19, in <module>
    from contentstore.views.helpers import is_item_in_course_tree
  File "/openedx/edx-platform/cms/djangoapps/contentstore/views/__init__.py", line 9, in <module>
    from .course import *
  File "/openedx/edx-platform/cms/djangoapps/contentstore/views/course.py", line 101, in <module>
    from Crypto.Cipher import AES
ImportError: No module named Crypto.Cipher

很抱歉问了一个非常模糊的问题,因为我不是一个真正的python/django/OpenEDX开发人员,只是负责支持这个项目,做了一些繁重的研究,但仍然不轻松


Tags: djangoinfrompyimportcmslinecrypto