【发布时间】:2023-02-22 01:41:52
【问题描述】:
我正在尝试在 google colab 中运行 pytorch 代码。 github存储库是:
google colab notebook 中有一个自定义模块。为了构建我运行的模块python setup.py build_ext --inplace
我的文件夹结构:
ls /content/drive/MyDrive/FaceDetector
doc mtcnn output README.md scripts setup.py tests tutorial
我还在系统路径中添加了
import sys
sys.path.append('/content/drive/MyDrive/FaceDetector')
所以当我尝试导入它时
import mtcnn
我收到一个错误:
ModuleNotFoundError
Traceback (most recent call last)
[<ipython-input-61-eb80d650f81e>](https://localhost:8080/#) in <module>
----> 1 import mtcnn
---
2 frames
---
[/content/drive/MyDrive/FaceDetector/mtcnn/deploy/detect.py](https://localhost:8080/#) in <module>
4 import time
5 ----> 6 import mtcnn.utils.functional as func
7 8 def _no_grad(func):
ModuleNotFoundError: No module named 'mtcnn.utils.functional'
Google Colab 笔记本链接: https://colab.research.google.com/drive/1KQRF-HmZA7EU13acnwIX0dFayRMIuQ-B?usp=sharing
【问题讨论】:
标签: python pytorch google-colaboratory