【复现】程序报错
程序下载完并安装必要的环境之后,github上的代码需要指令行运行代码
调好安装环境和必要的安装包之后,出现了下面的报错,记录一下解决方法
D:\programProject\AS-GCN-master> python main.py recognition -c config/as_gcn/ntu-xsub/train_aim.yaml
Traceback (most recent call last):
File "main.py", line 13, in <module>
processors['demo'] = import_class('processor.demo.Demo')
File "D:\anaconda3\envs\wq\lib\site-packages\torchlight-1.0-py3.6.egg\torchlight\io.py", line 183, in import_class
ModuleNotFoundError: No module named 'processor.demo'
文中将报错的这行程序注释掉就行,或者删除掉
复现代码的时候在main.py中torchlight与conda环境中的torchlight冲突
pip uninstall torchlight
卸载conda环境中的torchlight
使用文件目录中的torchlight,看清楚目录层级,我的是下面图片这样的
导入的用下面的指令
from torchlight.torchlight.io import import_class
更改好其他程序文件的包导入,想下面这样,然后这问题就解决了,剩下的复现程序报错,文件路径啥的看清楚,慢慢改,后面有更大的问题再记录,有其他问题可以留言交流!
import torchlight
from torchlight.torchlight.io import str2bool
from torchlight.torchlight.io import DictAction
from torchlight.torchlight.io import import_class