Skip to content

GUI crashes with module error when module is available in python #18

@FranzEricSchneider

Description

@FranzEricSchneider

Hi, I am operating in a conda environment created as suggested in the PlantGL installation. In python I am able to import openalea.plantgl but the executable plantscan3d nonetheless crashes on that import. I'm not sure what I can do to try and debug this, do you have any ideas? Thank you

(pgl) eric@eric-desktop:~/Desktop/plantscan3d$ plantscan3d 
Traceback (most recent call last):
  File "/usr/local/bin/plantscan3d", line 11, in <module>
    load_entry_point('OpenAlea.PlantScan3D==1.3.0', 'gui_scripts', 'plantscan3d')()
  File "/home/eric/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 486, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/eric/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2867, in load_entry_point
    return ep.load()
  File "/home/eric/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2471, in load
    return self.resolve()
  File "/home/eric/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2477, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.8/dist-packages/OpenAlea.PlantScan3D-1.3.0-py3.8.egg/openalea/plantscan3d/main_window.py", line 10, in <module>
    from openalea.plantgl.gui.qt.QtCore import *
ModuleNotFoundError: No module named 'openalea.plantgl'

(pgl) eric@eric-desktop:~/Desktop/plantscan3d$ ipython3
Python 3.10.8 | packaged by conda-forge | (main, Nov 22 2022, 08:26:04) [GCC 10.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.9.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from openalea.plantgl.gui.qt.QtCore import *
In [2]:

I have two initial guesses to this, but I'm not sure how to solve them...

  1. Before I realized that a conda environment was needed with plantgl, I ran python setup.py install for plantscan3d on my local system. I think that's what's being used above. I've tried running python setup.py install for plantscan3d in the conda environment, but it doesn't change anything. Is there a way to uninstall the local non-conda version cleanly?
  2. Probably because of point (1), plantscan3d appears to be referencing python3.8 and the conda environment is using python3.10.

Any help debugging would be appreciated, thank you

EDIT: Happens again after deleting the pgl environment and removing /usr/local/lib/python3.8/dist-packages/OpenAlea.PlantScan3D-1.3.0-py3.8.egg/ entirely, then running

conda create -n pgl openalea.plantgl -c fredboudon -c conda-forge
conda activate pgl
conda install pyqglviewer -c fredboudon -c conda-forge
cd plantscan3d/
sudo python3 setup.py install  # succeeds
plantscan3d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions