Romea / cropcraft

A Procedural World Generator for Robotics Simulation of Agricultural Tasks
Apache License 2.0
68 stars 6 forks source link

Dependency Errors #4

Closed Iranaphor closed 1 month ago

Iranaphor commented 2 months ago

Hi,

On following the README instructions when running python3 cropcraft.py examples/test1.yaml, I am getting an error ModuleNotFoundError: No module named 'appdirs'. Can you offer any advice on specific versions required?

Ubuntu 22.04.4
Blender 4.2.0
Python 3.11.0
python3.11 -m pip list
appdirs                              1.4.4

Full Output:

~/cropcraft$ python3.11 cropcraft.py examples/test1.yaml 
Blender 4.2.0 (hash a51f293548ad built 2024-07-16 06:27:02)
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting appdirs
  Obtaining dependency information for appdirs from https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl.metadata
  Using cached appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Installing collected packages: appdirs
Successfully installed appdirs-1.4.4

[notice] A new release of pip is available: 23.2.1 -> 24.1.2
[notice] To update, run: /snap/blender/5088/4.2/python/bin/python3.11 -m pip install --upgrade pip
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting pyyaml
  Obtaining dependency information for pyyaml from https://files.pythonhosted.org/packages/7b/5e/efd033ab7199a0b2044dab3b9f7a4f6670e6a52c089de572e928d2873b06/PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Using cached PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (757 kB)
Installing collected packages: pyyaml
Successfully installed pyyaml-6.0.1

[notice] A new release of pip is available: 23.2.1 -> 24.1.2
[notice] To update, run: /snap/blender/5088/4.2/python/bin/python3.11 -m pip install --upgrade pip
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting msgpack
  Obtaining dependency information for msgpack from https://files.pythonhosted.org/packages/f6/f0/a7bdb48223cd21b9abed814b08fca8fe6a40931e70ec97c24d2f15d68ef3/msgpack-1.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached msgpack-1.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.1 kB)
Using cached msgpack-1.0.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (409 kB)
Installing collected packages: msgpack
Successfully installed msgpack-1.0.8

[notice] A new release of pip is available: 23.2.1 -> 24.1.2
[notice] To update, run: /snap/blender/5088/4.2/python/bin/python3.11 -m pip install --upgrade pip
Traceback (most recent call last):
  File "/home/user/cropcraft/core/blender_entrypoint.py", line 20, in <module>
    import core
  File "/home/user/cropcraft/core/__init__.py", line 39, in <module>
    from . import beds
  File "/home/user/cropcraft/core/beds.py", line 20, in <module>
    from .plant_manager import PlantManager
  File "/home/user/cropcraft/core/plant_manager.py", line 17, in <module>
    from . import input_utils
  File "/home/user/cropcraft/core/input_utils.py", line 13, in <module>
    import appdirs
ModuleNotFoundError: No module named 'appdirs'

Blender quit
Iranaphor commented 2 months ago

We have found this can be resolved by downgrading blender to version 4.1.0 using sudo snap install blender --channel=4.1/stable --classic and suggest an update to the README.md to reflect this.

CyrillePierre commented 1 month ago

Thanks, I have not tested it since blender 4.2. I will fix it for this version.