ImportError: cannot import name ‘UnencryptedCookieSessionFactory
【摘要】 问题描述在jetson nx上安装apex的时候,直接使用pip install apex命令安装的,调用时出现如下错误from predictor import FeatureExtractionDemo File "/home/shuyuan/yolov5-master/./fast_reid/demo/predictor.py", line 16, in <module> f...
问题描述
在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 ./
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)