本文介绍了导入 Apex 时出现 `UnencryptedCookieSessionFactoryConfig` 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Apex,每当我尝试导入它(或任何涉及它的东西)时,我都会得到以下回溯:

I'm trying to use Apex and whenever I try to import it (or anything involving it) I get the following traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/anaconda3/lib/python3.8/site-packages/apex/__init__.py", line 13, in <module>
    from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)

我安装并导入了 Pyramid 库,不会导致任何问题.我的 Python 版本是 3.8.5,我的操作系统是 Ubuntu 18.04.5.

I have the Pyramid library installed and importing that causes no issues. My Python version is 3.8.5 and my OS is Ubuntu 18.04.5.

我尝试在网上搜索,但没有找到令人满意的解决方案,希望知道是否有熟悉的人能够提供一些有关问题可能是什么以及我可以做什么的提示.谢谢.

I've tried searching online but haven't been able to find a satisfactory solution and was hoping to know if anyone who is familiar would be able to provide some tips on what the problem may be and what I can do. Thanks.

推荐答案

如果我使用 pip install apex,我会遇到同样的问题.

I get the same issue if I use pip install apex.

事实证明,pypi 上的 apex 与 NVIDIA 的 apex 没有任何关系,并且是一个完全不相关的、非常古老的包.

It turns out that apex on pypi has nothing to do with NVIDIA's apex and is a totally unrelated, really old package.

要安装 NVIDIA 的 apex,请执行以下操作:

To install NVIDIA's apex do:

git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --disable-pip-version-check --no-cache-dir \
--global-option="--cpp_ext" --global-option="--cuda_ext" ./

有关详细信息,请参阅doc.

For more info see doc.

这篇关于导入 Apex 时出现 `UnencryptedCookieSessionFactoryConfig` 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 03:40