You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to run the jupyter-notebook example using Colab, but encountered an error during import pyepo. Could you please advise on how to resolve this issue?
Thank you in advance!
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-16-9aebf8cb754e>](https://localhost:8080/#) in <cell line: 3>()
1 import time
2 import random
----> 3 import pyepo
4 import torch
5 from torch import nn
6 frames
[/usr/local/lib/python3.10/dist-packages/pyomo/common/dependencies.py](https://localhost:8080/#) in find_spec(self, fullname, path, target)
525 # the module is coming from: file system, registry, etc.)
526 for finder in sys.meta_path[sys.meta_path.index(self) + 1 :]:
--> 527 spec = finder.find_spec(fullname, path, target)
528 if spec is not None:
529 break
AttributeError: '_PyDrive2ImportHook' object has no attribute 'find_spec'
The text was updated successfully, but these errors were encountered:
We’re aware that this issue stems from environmental hooks in Colab. While this is not directly a pyepo bug, we’ll consider doing something to help users who run into this. We will also keep an eye on changes to pyomo or PyDrive2 that might address the underlying incompatibility.
The error seems to be caused by a compatibility conflict between pyomo (a dependency of pyepo) and the PyDrive2 import hook in the Google Colab environment.
Google Colab sets up some custom import hooks such as (_PyDrive2ImportHook) to integrate with Google Drive. Still, this hook does not implement find_spec as expected by Python’s newer import machinery, which pyomo relies on.
You can temporarily remove the problematic hook with:
I attempted to run the
jupyter-notebook
example using Colab, but encountered an error duringimport pyepo
. Could you please advise on how to resolve this issue?Thank you in advance!
The text was updated successfully, but these errors were encountered: