Skip to content
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

Conda: ModuleNotFoundError: No module named 'python_griddly' #291

Open
gabegrand opened this issue Aug 29, 2023 · 2 comments
Open

Conda: ModuleNotFoundError: No module named 'python_griddly' #291

gabegrand opened this issue Aug 29, 2023 · 2 comments

Comments

@gabegrand
Copy link

I'm trying to build a clean conda environment with Griddly manually installed from the repo. (The latest griddly version on PyPI is 1.6.7, which has some incompatibilities with gymnasium -- and I still have the Apple Silicon / Vulkan error from #286 which I'm hoping to resolve soon.)

I've spent a couple hours on this but still can't get past what seems to be a path error.

Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:39:40) [Clang 15.0.7 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import griddly
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/grandg/mit/Griddly/python/griddly/__init__.py", line 16, in <module>
    gd = importlib.import_module("python_griddly")
  File "/opt/anaconda3/envs/gridtheory/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'python_griddly'

I tried the os.environ['PYTHONPATH'] hack from #126, but it didn't resolve the issue.

Minimal steps to reproduce:

  1. conda create -n griddly python=3.10
  2. conda activate griddly
  3. Follow manual build instructions from README
  4. python -m pip install -e .
  5. import griddly in Python interpreter
@gabegrand
Copy link
Author

Hey @Bam4d, thanks for the heads-up about the switch to poetry! Unfortunately, even after running poetry install and activating the environment with poetry shell, I'm still getting the above error. I've tried both installing within a pre-existing conda environment, and also installing on top of my base conda environment.

I noticed that even with the griddly poetry environment activated, poetry show reveals that griddly is not in the list of installed packages.

Do you have any suggestions? I'm pretty new to poetry so I'm not sure if I might be missing something.

@daveey
Copy link
Contributor

daveey commented Feb 11, 2024

I was hitting this with python 3.10 on my mac, but it went away when i switched to python 3.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants