ImportError: cannot import name ‘UnencryptedCookieSessionFactoryConfig‘ from ‘pyramid.session‘
Posted AI浩
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ImportError: cannot import name ‘UnencryptedCookieSessionFactoryConfig‘ from ‘pyramid.session‘相关的知识,希望对你有一定的参考价值。
问题描述
在jetson nx上安装apex的时候,直接使用pip install apex命令安装的,调用时出现如下错误
from predictor import FeatureExtractionDemo
File "/home/shuyuan/yolov5-master/./fast_reid/demo/predictor.py", line 16, in <module>
from fastreid.engine import DefaultPredictor
File "/home/shuyuan/yolov5-master/./fast_reid/fastreid/engine/__init__.py", line 6, in <module>
from .train_loop import *
File "/home/shuyuan/yolov5-master/./fast_reid/fastreid/engine/train_loop.py", line 14, in <module>
from apex import amp
File "/home/shuyuan/anaconda3/envs/shuyuan/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)
解决方法
卸载原先安装的,然后执行如下命令:
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir ./
以上是关于ImportError: cannot import name ‘UnencryptedCookieSessionFactoryConfig‘ from ‘pyramid.session‘的主要内容,如果未能解决你的问题,请参考以下文章
解决 ImportError: cannot import name pywrap_tensorflow
ImportError: cannot import name webdriver
ImportError: cannot import name patterns
window环境下ImportError: cannot import name 'Bar' from 'pyecharts'