我有一个 .py 文件,该文件位于我的gdrive中:
content/gdrive/My Drive/Colab Notebooks/Data/pySEN.py
我正在尝试从此文件导入模块ESN,但失败。
我的代码如下:
from google.colab import drive
drive.mount('/content/gdrive')
sys.path.append('/content/gdrive/My Drive/Colab Notebooks/Data/')
from pySEN import ESN
我得到:
ModuleNotFoundError: No module named 'pySEN'
我尝试了此解决方案,但失败了:
Importing a python module from the python script from drive in colab
Is it possible to import my own modules into a google-colaboratory notebook?
请咨询。 谢谢