-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import textworld in colab #320
Comments
I just realized that it might be because colab updated the main kernel to python 3.10. However I'm still having the same issue in virtual environment using python 3.9. |
Hi @rfy1004. Did you change the runtime after installing 3.9? You can change it in the Runtime dropdown menu. Eg. for py38 I followed this Also, note that |
Thanks for the solutions for installing Python 3.8. I followed this https://stackoverflow.com/a/71511943 and successfully changed the runtime type to Python 3.8. However when I run ImportError Traceback (most recent call last) File /usr/local/lib/python3.8/site-packages/textworld/init.py:11 File /usr/local/lib/python3.8/site-packages/textworld/generator/init.py:30 File /usr/local/lib/python3.8/site-packages/textworld/generator/maker.py:27 File /usr/local/lib/python3.8/site-packages/textworld/envs/glulx/git_glulx.py:13 ImportError: libffi.so.6: cannot open shared object file: No such file or directory I tried to manually install
|
I figured out that the above error occurred because colab uses `--------------------------------------------------------------------------- File /usr/local/lib/python3.8/site-packages/textworld/init.py:11 File /usr/local/lib/python3.8/site-packages/textworld/generator/init.py:30 File /usr/local/lib/python3.8/site-packages/textworld/generator/maker.py:27 File /usr/local/lib/python3.8/site-packages/textworld/envs/init.py:7 File /usr/local/lib/python3.8/site-packages/textworld/envs/wrappers/init.py:9 File /usr/local/lib/python3.8/site-packages/textworld/envs/wrappers/tw_inform7.py:93 AttributeError: partially initialized module 'textworld' has no attribute 'core' (most likely due to a circular import)` |
Hi, I'm running the notebook 'Building a simple agent' in colab and have encountered the following ImportError when I tried to import textworld.
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)
I tried replacing 'from collections import Mapping' with 'from collections.ac import Mapping' and got this error instead:
AttributeError: partially initialized module 'textworld' has no attribute 'core' (most likely due to a circular import)
The installation of textworld was sucessfull.
The text was updated successfully, but these errors were encountered: