jdber1 / opendrop

OpenDrop pendant drop tensiometry software
GNU General Public License v3.0
30 stars 18 forks source link

Unable to run opendrop on ubuntu 22.04 after installation #42

Open mcekwonu opened 1 year ago

mcekwonu commented 1 year ago

I tried to run opendrop using the command: python -m opendrop But I got the error: from .colorize import * ModuleNotFoundError: No module named 'opendrop.features.colorize'. I don't know how to resolve this error.

eugenhu commented 1 year ago

Weird, you were able to install successfully using

pip3 install git+https://github.com/jdber1/opendrop.git

right?

If so, can you navigate to your python packages directory (e.g. /usr/lib/python3.10/site-packages), and then list ls the contents of opendrop/features/.

mcekwonu commented 1 year ago

Yes, I did successfully install using the above command.

I have tried to resolve it but couldn't. There is an imported package: from colorize import *, that's throwing up the module error when I call it.

On Thu, Jul 28, 2022, 11:51 PM eugenhu @.***> wrote:

Weird, you were able to install successfully using

pip3 install git+https://github.com/jdber1/opendrop.git

right?

If so, can you navigate to your python packages directory (e.g. /usr/lib/python3.10/site-packages), and then list ls the contents of opendrop/features/.

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1198252433, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXASWDSSXKJ4DEWTUE3VWKNAFANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

mcekwonu commented 1 year ago

First, I have two python installations, python3.8 and python3.10 which I have created symlink of python -> python3.8 and python3 -> python3.10. Then I installed with the command : python -m pip git+ https://github.com/jdber1/opendrop.git.

Since the error in launching using python -m opendrop, I uninstalled and then reinstalled but this time I get some errors which I have attached as log.


Kind regard,

Michael C. Ekwonu Doctoral candidate, Experimental Thermo-Fluids, Mechanics and Energy Systems (ExTENsys) Laboratory School of Mechanical Engineering, Building 303, Room 116 Pusan National University 2, Busandaehak-ro 63beon-gil, Geumjeong-gu (46241) 부산광역시 금정구 부산대학로 63번길 2 부산대학교 기계관 Korea +82-051-510-1536 https://fluid.pusan.ac.kr http://fluid.pusan.ac.kr https://epic.re.kr http://epic.re.kr

GitHub http://www.github.com/mcekwonu LinkedIn https://www.linkedin.com/in/michael-chukwuemeka-ekwonu-bb9a5144

On Fri, 29 Jul 2022 at 13:13, Michael Ekwonu @.***> wrote:

Yes, I did successfully install using the above command.

I have tried to resolve it but couldn't. There is an imported package: from colorize import *, that's throwing up the module error when I call it.

On Thu, Jul 28, 2022, 11:51 PM eugenhu @.***> wrote:

Weird, you were able to install successfully using

pip3 install git+https://github.com/jdber1/opendrop.git

right?

If so, can you navigate to your python packages directory (e.g. /usr/lib/python3.10/site-packages), and then list ls the contents of opendrop/features/.

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1198252433, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXASWDSSXKJ4DEWTUE3VWKNAFANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

eugenhu commented 1 year ago

I see, could you copy and paste the log instead of attaching it? I think github ignores the attachments when you reply by email. Thanks.

mcekwonu commented 1 year ago

mce@mce:~$ python -m pip install git+https://github.com/jdber1/opendrop.git --user Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Collecting git+https://github.com/jdber1/opendrop.git Cloning https://github.com/jdber1/opendrop.git to /tmp/pip-req-build-x9qetr62 Running command git clone --filter=blob:none --quiet https://github.com/jdber1/opendrop.git /tmp/pip-req-build-x9qetr62 Resolved https://github.com/jdber1/opendrop.git to commit bf5ad09e792063806a9894a48e41c21c928f3a52 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [133 lines of output]

:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives python3 -m cython -3 --cplus -o opendrop/features/.checkpoints/colorize.cpp opendrop/features/colorize.pyx g++ -o opendrop/features/.checkpoints/colorize.os -c -O3 -std=c++14 -fPIC -Iinclude -I/usr/include/python3.10 opendrop/features/.checkpoints/colorize.cpp g++ -o opendrop/features/colorize.cpython-310-x86_64-linux-gnu.so -shared opendrop/features/.checkpoints/colorize.os -L/usr/lib/x86_64-linux-gnu -lpython3.10 python3 -m cython -3 --cplus -o opendrop/fit/needle/.checkpoints/hough.cpp opendrop/fit/needle/hough.pyx g++ -o opendrop/fit/needle/.checkpoints/hough.os -c -O3 -std=c++14 -fPIC -Iinclude -I/usr/include/python3.10 opendrop/fit/needle/.checkpoints/hough.cpp g++ -o opendrop/fit/needle/hough.cpython-310-x86_64-linux-gnu.so -shared opendrop/fit/needle/.checkpoints/hough.os -L/usr/lib/x86_64-linux-gnu -lpython3.10 -lm python3 -m cython -3 --cplus -o opendrop/fit/younglaplace/.checkpoints/shape.cpp opendrop/fit/younglaplace/shape.pyx g++ -o opendrop/fit/younglaplace/.checkpoints/shape.os -c -O3 -std=c++14 -fPIC -Iinclude -I/usr/include/python3.10 opendrop/fit/younglaplace/.checkpoints/shape.cpp In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp: In constructor 'opendrop::younglaplace::YoungLaplaceShape::YoungLaplaceShape(realtype)': include/opendrop/younglaplace_detail.hpp:54:23: error: too few arguments to function '_generic_N_Vector* N_VNew_Serial(sunindextype, SUNContext)' 54 | nv = N_VNew_Serial(4); | ~~~~~~~~~~~~~^~~ In file included from include/opendrop/younglaplace.hpp:10, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/nvector/nvector_serial.h:85:26: note: declared here 85 | SUNDIALS_EXPORT N_Vector N_VNew_Serial(sunindextype vec_length, SUNContext sunctx); | ^~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp:56:27: error: too few arguments to function '_generic_N_Vector* N_VNew_Serial(sunindextype, SUNContext)' 56 | nv_DBo = N_VNew_Serial(4); | ~~~~~~~~~~~~~^~~ In file included from include/opendrop/younglaplace.hpp:10, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/nvector/nvector_serial.h:85:26: note: declared here 85 | SUNDIALS_EXPORT N_Vector N_VNew_Serial(sunindextype vec_length, SUNContext sunctx); | ^~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp:78:31: error: too few arguments to function 'void* ERKStepCreate(ARKRhsFn, realtype, N_Vector, SUNContext)' 78 | arkode_mem = ERKStepCreate(arkrhs, RCONST(0.0), nv); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:9, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/arkode/arkode_erkstep.h:76:23: note: declared here 76 | SUNDIALS_EXPORT void* ERKStepCreate(ARKRhsFn f, realtype t0, | ^~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp:97:35: error: too few arguments to function 'void* ERKStepCreate(ARKRhsFn, realtype, N_Vector, SUNContext)' 97 | arkode_mem_DBo = ERKStepCreate(arkrhs_DBo, RCONST(0.0), nv_DBo); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:9, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/arkode/arkode_erkstep.h:76:23: note: declared here 76 | SUNDIALS_EXPORT void* ERKStepCreate(ARKRhsFn f, realtype t0, | ^~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp: In member function 'realtype opendrop::younglaplace::YoungLaplaceShape::volume(realtype)': include/opendrop/younglaplace_detail.hpp:334:37: error: too few arguments to function '_generic_N_Vector* N_VMake_Serial(sunindextype, realtype*, SUNContext)' 334 | N_Vector nv_vol = N_VMake_Serial(1, data); | ~~~~~~~~~~~~~~^~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:10, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/nvector/nvector_serial.h:89:26: note: declared here 89 | SUNDIALS_EXPORT N_Vector N_VMake_Serial(sunindextype vec_length, realtype *v_data, SUNContext sunctx); | ^~~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp:337:41: error: too few arguments to function 'void* ERKStepCreate(ARKRhsFn, realtype, N_Vector, SUNContext)' 337 | void *arkode_mem_vol = ERKStepCreate(arkrhs_vol, RCONST(0.0), nv_vol); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:9, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/arkode/arkode_erkstep.h:76:23: note: declared here 76 | SUNDIALS_EXPORT void* ERKStepCreate(ARKRhsFn f, realtype t0, | ^~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp: In member function 'realtype opendrop::younglaplace::YoungLaplaceShape::surface_area(realtype)': include/opendrop/younglaplace_detail.hpp:371:38: error: too few arguments to function '_generic_N_Vector* N_VMake_Serial(sunindextype, realtype*, SUNContext)' 371 | N_Vector nv_surf = N_VMake_Serial(1, data); | ~~~~~~~~~~~~~~^~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:10, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/nvector/nvector_serial.h:89:26: note: declared here 89 | SUNDIALS_EXPORT N_Vector N_VMake_Serial(sunindextype vec_length, realtype *v_data, SUNContext sunctx); | ^~~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:135, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: include/opendrop/younglaplace_detail.hpp:374:42: error: too few arguments to function 'void* ERKStepCreate(ARKRhsFn, realtype, N_Vector, SUNContext)' 374 | void *arkode_mem_surf = ERKStepCreate(arkrhs_surf, RCONST(0.0), nv_surf); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/opendrop/younglaplace.hpp:9, from opendrop/fit/younglaplace/.checkpoints/shape.cpp:763: /usr/local/include/arkode/arkode_erkstep.h:76:23: note: declared here 76 | SUNDIALS_EXPORT void* ERKStepCreate(ARKRhsFn f, realtype t0, | ^~~~~~~~~~~~~ include/opendrop/younglaplace_detail.hpp: In instantiation of 'opendrop::younglaplace::YoungLaplaceShape::YoungLaplaceShape(realtype) [with realtype = double]': opendrop/fit/younglaplace/.checkpoints/shape.cpp:2760:79: required from here include/opendrop/younglaplace_detail.hpp:90:43: error: invalid conversion from 'int' to 'ARKODE_ERKTableID' [-fpermissive] 90 | flag = ERKStepSetTableNum(arkode_mem, DEFAULT_ERK_6); | ^~~~~~~~~~~~~ | | | int /usr/local/include/arkode/arkode_erkstep.h:112:76: note: initializing argument 2 of 'int ERKStepSetTableNum(void*, ARKODE_ERKTableID)' 112 | SUNDIALS_EXPORT int ERKStepSetTableNum(void *arkode_mem, ARKODE_ERKTableID itable); | ~~~~~~~~~~~~~~~~~~^~~~~~ include/opendrop/younglaplace_detail.hpp:106:47: error: invalid conversion from 'int' to 'ARKODE_ERKTableID' [-fpermissive] 106 | flag = ERKStepSetTableNum(arkode_mem_DBo, DEFAULT_ERK_6); | ^~~~~~~~~~~~~ | | | int /usr/local/include/arkode/arkode_erkstep.h:112:76: note: initializing argument 2 of 'int ERKStepSetTableNum(void*, ARKODE_ERKTableID)' 112 | SUNDIALS_EXPORT int ERKStepSetTableNum(void *arkode_mem, ARKODE_ERKTableID itable); | ~~~~~~~~~~~~~~~~~~^~~~~~ scons: *** [opendrop/fit/younglaplace/.checkpoints/shape.os] Error 1 Traceback (most recent call last): File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'buildapi' has no attribute 'prepare_metadata_for_build_wheel' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in main() File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "/tmp/pip-req-build-x9qetr62/build_backend/buildapi.py", line 6, in build_wheel subprocess.run(['scons', '-Q', 'bdist_wheel', '--build-dir=' + wheel_directory], check=True) File "/usr/local/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['scons', '-Q', 'bdist_wheel', '--build-dir=/tmp/pip-modern-metadata-3n2hmbb6']' returned non-zero exit status 2. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
eugenhu commented 1 year ago

Did you build sundials from source or installed it using apt? Just wondering if you know what sundials version you have since they updated their API in version 6.

Can you try installing from the development branch which has been updated to work with sundials 6:

python -m pip install git+https://github.com/jdber1/opendrop.git@development --user
mcekwonu commented 1 year ago

Yes, I did build sundials version 6.2.0.

I will try installing the development version.

Thanks

On Sat, Jul 30, 2022, 6:14 PM eugenhu @.***> wrote:

Did you build sundials from source or installed it using apt? Just wondering if you know what sundials version you have since they updated their API in version 6.

Can you try installing from the development branch which has been updated to work with sundials 6:

python -m pip install @.*** --user

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1200122304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXAXVQT5J4RH3JNO3KDVWTW73ANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

mcekwonu commented 1 year ago

python -m pip install git+https://github.com/jdber1/opendrop.git@development --user Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Collecting git+https://github.com/jdber1/opendrop.git@development Cloning https://github.com/jdber1/opendrop.git (to revision development) to /tmp/pip-req-build-nb9xgp20 Running command git clone --filter=blob:none --quiet https://github.com/jdber1/opendrop.git /tmp/pip-req-build-nb9xgp20 Running command git checkout -b development --track origin/development Switched to a new branch 'development' Branch 'development' set up to track remote branch 'development' from 'origin'. Resolved https://github.com/jdber1/opendrop.git to commit cf9d5aa2f06d625f306114d001a99934cb913ff0 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: matplotlib in ./.local/lib/python3.8/site-packages (from opendrop==3.3.2.dev8+gcf9d5aa) (3.5.2) Requirement already satisfied: scipy in ./.local/lib/python3.8/site-packages (from opendrop==3.3.2.dev8+gcf9d5aa) (1.8.1) Requirement already satisfied: pycairo in ./.local/lib/python3.8/site-packages (from opendrop==3.3.2.dev8+gcf9d5aa) (1.21.0) Requirement already satisfied: pygobject in /usr/local/lib/python3.8/site-packages (from opendrop==3.3.2.dev8+gcf9d5aa) (3.42.2) Requirement already satisfied: injector in ./.local/lib/python3.8/site-packages (from opendrop==3.3.2.dev8+gcf9d5aa) (0.20.1) Requirement already satisfied: numpy in ./.local/lib/python3.8/site-packages (from opendrop==3.3.2.dev8+gcf9d5aa) (1.22.4) Requirement already satisfied: typing-extensions>=3.7.4 in ./.local/lib/python3.8/site-packages (from injector->opendrop==3.3.2.dev8+gcf9d5aa) (4.1.1) Requirement already satisfied: cycler>=0.10 in ./.local/lib/python3.8/site-packages (from matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (0.10.0) Requirement already satisfied: python-dateutil>=2.7 in ./.local/lib/python3.8/site-packages (from matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (2.8.2) Requirement already satisfied: kiwisolver>=1.0.1 in ./.local/lib/python3.8/site-packages (from matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (1.3.1) Requirement already satisfied: fonttools>=4.22.0 in ./.local/lib/python3.8/site-packages (from matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (4.27.1) Requirement already satisfied: pyparsing>=2.2.1 in ./.local/lib/python3.8/site-packages (from matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (2.4.7) Requirement already satisfied: packaging>=20.0 in ./.local/lib/python3.8/site-packages (from matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (21.3) Requirement already satisfied: pillow>=6.2.0 in ./.local/lib/python3.8/site-packages (from matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (9.1.0) Requirement already satisfied: six in ./.local/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->opendrop==3.3.2.dev8+gcf9d5aa) (1.15.0) Building wheels for collected packages: opendrop Building wheel for opendrop (pyproject.toml) ... done Created wheel for opendrop: filename=opendrop-3.3.2.dev8+gcf9d5aa-cp310-abi3-linux-x86_64.whl size=2119631 sha256=8a6c56f9b836d66553da399695c6975b4b9cc361e1923c9f57098093c84daeff Stored in directory: /tmp/pip-ephem-wheel-cache-1_84076h/wheels/60/87/ee/a363e50c655a38a7567c391ab2c8574570f670f13aec719040 Successfully built opendrop Installing collected packages: opendrop Successfully installed opendrop-3.3.2.dev8+gcf9d5aa

****Successfully installed the development version. But when I call it, same error:

mce@mce:~$ python -m opendrop Traceback (most recent call last): File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/mce/.local/lib/python3.8/site-packages/opendrop/main.py", line 30, in from opendrop.app import OpendropApplication File "/home/mce/.local/lib/python3.8/site-packages/opendrop/app/init.py", line 36, in from . import main_menu, ift, conan, common File "/home/mce/.local/lib/python3.8/site-packages/opendrop/app/ift/init.py", line 29, in from . import ift_experiment, image_processing, physical_parameters, report File "/home/mce/.local/lib/python3.8/site-packages/opendrop/app/ift/ift_experiment.py", line 37, in from .services.progress import IFTAnalysisProgressHelper File "/home/mce/.local/lib/python3.8/site-packages/opendrop/app/ift/services/progress.py", line 6, in from opendrop.app.ift.services.analysis import PendantAnalysisJob File "/home/mce/.local/lib/python3.8/site-packages/opendrop/app/ift/services/analysis.py", line 40, in from .features import ( File "/home/mce/.local/lib/python3.8/site-packages/opendrop/app/ift/services/features.py", line 38, in from opendrop.features.pendant import PendantFeatures, extract_pendant_features File "/home/mce/.local/lib/python3.8/site-packages/opendrop/features/init.py", line 1, in from .colorize import * ModuleNotFoundError: No module named 'opendrop.features.colorize'


eugenhu commented 1 year ago

That's weird, I wonder if some of the C extension modules was compiled using python 3.10.

Can you paste the output of ls /home/mce/.local/lib/python3.8/site-packages/opendrop/features/.

It should contain at least the file colorize.cpython-38-x86_64-linux-gnu.so.

mcekwonu commented 1 year ago

Here is the output:

colorize.cpython-310-x86_64-linux-gnu.so init.py pycache conan.py pendant.py

eugenhu commented 1 year ago

I think the problem is the build tool is assuming the correct python executable to use is python3 (which is python 3.10 in your case), even though pip was run with a different python version. I've pushed a patch for this to the development branch, do you mind trying it out to see if it solves the issue?

Uninstall:

python -m pip uninstall opendrop

Install:

python -m pip install git+https://github.com/jdber1/opendrop.git@development --user
mcekwonu commented 1 year ago

I successfully installed opendrop but when I run it, it still get same error. "from .colorize import *, ModuleNotFound: No named opendrop.features.colorize"

I don't know maybe the issue is it my python installation. Let me give a quick brief of my python installation. I have two python installed, python3.8 and python3.10. The default is python3.8, as python3.10 came via upgrade from Ubuntu 20.04 to Ubuntu 22.04 (since python3.10 ships directly with Ubuntu 22.04). I am not sure but am thinking the issue maybe somehow associated to Ubuntu 22.04.

eugenhu commented 1 year ago

Sorry my bad, the last patch was missing a key change (which I've now included). Do you mind trying again?

mcekwonu commented 1 year ago

Sure


Kind regard,

Michael C. Ekwonu Doctoral candidate, Experimental Thermo-Fluids, Mechanics and Energy Systems (ExTENsys) Laboratory School of Mechanical Engineering, Building 303, Room 116 Pusan National University 2, Busandaehak-ro 63beon-gil, Geumjeong-gu (46241) 부산광역시 금정구 부산대학로 63번길 2 부산대학교 기계관 Korea +82-051-510-1536 https://fluid.pusan.ac.kr http://fluid.pusan.ac.kr https://epic.re.kr http://epic.re.kr

GitHub http://www.github.com/mcekwonu LinkedIn https://www.linkedin.com/in/michael-chukwuemeka-ekwonu-bb9a5144

On Tue, 2 Aug 2022 at 19:09, eugenhu @.***> wrote:

Sorry my bad, the last patch was missing a key change. Do you mind trying again?

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1202286896, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXBKH6ECZOZNIRGBRO3VXDXVZANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

mcekwonu commented 1 year ago

python -m pip install git+https://github.com/jdber1/opendrop.git@development --user Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Collecting git+https://github.com/jdber1/opendrop.git@development Cloning https://github.com/jdber1/opendrop.git (to revision development) to /tmp/pip-req-build-_wrnwzk3 Running command git clone --filter=blob:none --quiet https://github.com/jdber1/opendrop.git /tmp/pip-req-build-_wrnwzk3 Running command git checkout -b development --track origin/development Switched to a new branch 'development' Branch 'development' set up to track remote branch 'development' from 'origin'. Resolved https://github.com/jdber1/opendrop.git to commit e18fbf3d7d6f94d02f4846400be518a56b86e73c Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [27 lines of output] /usr/local/bin/python3 -m cython -3 --cplus -o opendrop/features/.checkpoints/colorize.cpp opendrop/features/colorize.pyx g++ -o opendrop/features/.checkpoints/colorize.os -c -O3 -std=c++14 -fPIC -Iinclude -I/usr/local/include/python3.8 opendrop/features/.checkpoints/colorize.cpp g++ -o opendrop/features/colorize.cpython-38-x86_64-linux-gnu.so -shared opendrop/features/.checkpoints/colorize.os -L/usr/local/lib -lpython3.8 /bin/ld: /usr/local/lib/libpython3.8.a(object.o): warning: relocation against PyDictKeys_Type' in read-only section.text' /bin/ld: /usr/local/lib/libpython3.8.a(floatobject.o): relocation R_X86_64_PC32 against symbol `PyFloat_Type' can not be used when making a shared object; recompile with -fPIC /bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status scons: *** [opendrop/features/colorize.cpython-38-x86_64-linux-gnu.so] Error 1 Traceback (most recent call last): File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'buildapi' has no attribute 'prepare_metadata_for_build_wheel'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/mce/.local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
      whl_basename = backend.build_wheel(metadata_directory, config_settings)
    File "/tmp/pip-req-build-_wrnwzk3/build_backend/buildapi.py", line 12, in build_wheel
      subprocess.run(['scons', '-Q', 'bdist_wheel', '--build-dir=' + wheel_directory], check=True, env=env)
    File "/usr/local/lib/python3.8/subprocess.py", line 512, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['scons', '-Q', 'bdist_wheel', '--build-dir=/tmp/pip-modern-metadata-s0d1apwx']' returned non-zero exit status 2.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

eugenhu commented 1 year ago

Looks like a linker error now.. I'll need to look into this further to come up with a possible solution.

For the time being, opendrop works just as well with python 3.10 if you don't mind using that (except no GenICam support at the moment). So you could try installing opendrop with

python3 -m pip install git+https://github.com/jdber1/opendrop.git@development --user

If I recall correctly you said you have python3 symlinked to python 3.10. Then run with python3 -m opendrop. (If you need to satisfy the opencv dependency for python 3.10, install the standalone opencv-python python package using pip.)

Thanks for your patience.

mcekwonu commented 1 year ago

Thnaks I will do that for now.


Kind regard,

Michael C. Ekwonu Doctoral candidate, Experimental Thermo-Fluids, Mechanics and Energy Systems (ExTENsys) Laboratory School of Mechanical Engineering, Building 303, Room 116 Pusan National University 2, Busandaehak-ro 63beon-gil, Geumjeong-gu (46241) 부산광역시 금정구 부산대학로 63번길 2 부산대학교 기계관 Korea +82-051-510-1536 https://fluid.pusan.ac.kr http://fluid.pusan.ac.kr https://epic.re.kr http://epic.re.kr

GitHub http://www.github.com/mcekwonu LinkedIn https://www.linkedin.com/in/michael-chukwuemeka-ekwonu-bb9a5144

On Tue, 2 Aug 2022 at 19:44, eugenhu @.***> wrote:

Looks like a linker error now.. I'll need to look into this further to come up with a possible solution.

For the time being, opendrop works just as well with python 3.10 if you don't mind using that (except no GenICam support at the moment). So you could try installing opendrop with

python3 -m pip install @.*** --user

If I recall correctly you said you have python3 symlinked to python 3.10. Then run with python3 -m opendrop. (If you need to satisfy the opencv dependency for python 3.10, install the standalone opencv-python https://pypi.org/project/opencv-python/ python package using pip.)

Thanks for your patience.

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1202319266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXG6P64TKBFRQUYXK7LVXD3X5ANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

mcekwonu commented 1 year ago

Thanks for your response. Sure, I will try it out and let you know the result.


Kind regard,

Michael C. Ekwonu Doctoral candidate, Experimental Thermo-Fluids, Mechanics and Energy Systems (ExTENsys) Laboratory School of Mechanical Engineering, Building 303, Room 116 Pusan National University 2, Busandaehak-ro 63beon-gil, Geumjeong-gu (46241) 부산광역시 금정구 부산대학로 63번길 2 부산대학교 기계관 Korea +82-051-510-1536 https://fluid.pusan.ac.kr http://fluid.pusan.ac.kr https://epic.re.kr http://epic.re.kr

GitHub http://www.github.com/mcekwonu LinkedIn https://www.linkedin.com/in/michael-chukwuemeka-ekwonu-bb9a5144

On Mon, 1 Aug 2022 at 22:56, eugenhu @.***> wrote:

I think the problem is the build tool is assuming the correct python executable to use is python3 (which is python 3.10 in your case), even though pip was run with a different python version. I've pushed a patch for this to the development branch, do you mind trying it out to see if it solves the issue?

Uninstall:

python -m pip uninstall opendrop

Install:

python -m pip install @.*** --user

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1201240713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXEI4DSAJGPXJOS7XQDVW7JQXANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

eugenhu commented 1 year ago

I think I know the problem. When compiling Python C extension modules in Windows, one needs to the .pyd/DLL with the stub import library of the libpython shared lib. In Linux, you don't need to do this (and shouldn't) because of differences in architecture, but it doesn't hurt to do so as long as Python was compiled with --enable-shared (build shared libraries). I'm assuming your installation of python 3.8 does not come with the shared libpython library, and hence linker tries to link with the static libpython library and fails.

The build script currently doesn't adjust the compiler flags when building on Windows or Linux. I'll have to make a patch for this so on Linux the compiler doesn't try to link python extension modules with libpython. It's not a hard task but I'll need to get around doing it, maybe give me < 1 week? I'll let you know when I've made the changes.

mcekwonu commented 1 year ago

Thank you for the update. I await your mail when you are done writing the patch.


Kind regard,

Michael C. Ekwonu Doctoral candidate, Experimental Thermo-Fluids, Mechanics and Energy Systems (ExTENsys) Laboratory School of Mechanical Engineering, Building 303, Room 116 Pusan National University 2, Busandaehak-ro 63beon-gil, Geumjeong-gu (46241) 부산광역시 금정구 부산대학로 63번길 2 부산대학교 기계관 Korea +82-051-510-1536 https://fluid.pusan.ac.kr http://fluid.pusan.ac.kr https://epic.re.kr http://epic.re.kr

GitHub http://www.github.com/mcekwonu LinkedIn https://www.linkedin.com/in/michael-chukwuemeka-ekwonu-bb9a5144

On Fri, 28 Oct 2022 at 18:00, eugenhu @.***> wrote:

I think I know the problem. When compiling Python C extension modules in Windows, one needs to the .pyd/DLL with the stub import library of the libpython shared lib. In Linux, you don't need to do this (and shouldn't) because of differences in architecture, but it doesn't hurt to do so as long as Python was compiled with --enable-shared (build shared libraries). I'm assuming your installation of python 3.8 does not come with the shared libpython library, and hence linker tries to link with the static libpython library and fails.

The build script currently doesn't adjust the compiler flags when building on Windows or Linux. I'll have to make a patch for this so on Linux the compiler doesn't try to link python extension modules with libpython. It's not a hard task but I'll need to get around doing it, maybe give me < 1 week? I'll let you know when I've made the changes.

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1294727838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXA6XVJ2DDLL7MKPBGTWFOI2FANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

eugenhu commented 1 year ago

Hello again.. slightly longer than a week, but when you have time could you try running:

python -m pip install git+https://github.com/jdber1/opendrop.git@issue42 --user
mcekwonu commented 1 year ago

Sure, I will try it and let you know.

On Sun, Nov 6, 2022, 4:17 PM eugenhu @.***> wrote:

Hello again.. slightly longer than a week, but when you have time could you try running:

python -m pip install @.*** --user

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1304735584, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXAN4DPFFGSSQ5T5OSDWG5LRFANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

mcekwonu commented 1 year ago

Hi, I have tried it and got an error message that could not build wheel for opendrop. See attached for details of the error.

Thank you


Kind regard,

Michael C. Ekwonu Doctoral candidate, Experimental Thermo-Fluids, Mechanics and Energy Systems (ExTENsys) Laboratory School of Mechanical Engineering, Building 303, Room 116 Pusan National University 2, Busandaehak-ro 63beon-gil, Geumjeong-gu (46241) 부산광역시 금정구 부산대학로 63번길 2 부산대학교 기계관 Korea +82-051-510-1536 https://fluid.pusan.ac.kr http://fluid.pusan.ac.kr https://epic.re.kr http://epic.re.kr

GitHub http://www.github.com/mcekwonu LinkedIn https://www.linkedin.com/in/michael-chukwuemeka-ekwonu-bb9a5144

On Sun, 6 Nov 2022 at 18:22, Michael Ekwonu @.***> wrote:

Sure, I will try it and let you know.

On Sun, Nov 6, 2022, 4:17 PM eugenhu @.***> wrote:

Hello again.. slightly longer than a week, but when you have time could you try running:

python -m pip install @.*** --user

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1304735584, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXAN4DPFFGSSQ5T5OSDWG5LRFANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

eugenhu commented 1 year ago

Can you send the error message directly or attach it by posting through the github website? Attachments in email replies are ignored by github.

mcekwonu commented 1 year ago

Ok. I will attached the error message via github.

On Sun, Nov 13, 2022, 10:34 PM eugenhu @.***> wrote:

Can you send the error message directly or attach it by posting through the github website? Attachments in email replies are ignored by github.

— Reply to this email directly, view it on GitHub https://github.com/jdber1/opendrop/issues/42#issuecomment-1312732084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEINKXARA7A7SHYKEATLT3LWIDU65ANCNFSM545BPDNA . You are receiving this because you authored the thread.Message ID: @.***>

mcekwonu commented 1 year ago

Hello again.. slightly longer than a week, but when you have time could you try running:

python -m pip install git+https://github.com/jdber1/opendrop.git@issue42 --user

I have tried installing using this but got error message: WARNING: Built wheel for opendrop is invalid: opendrop-3.3.2.dev10+g1809fcc-cp38-abi3-linux-x86_64.whl is not a valid wheel filename. ERROR: Could not build wheels for opendrop, which is required to install pyproject.toml-based projects

eugenhu commented 1 year ago

Woops, sorry for the very late reply, forgot about this.

I've made a patch to fix the wheel filename, can you try this again when you have time:

python -m pip install git+https://github.com/jdber1/opendrop.git@issue42 --user

Thanks

mcekwonu commented 1 year ago

Woops, sorry for the very late reply, forgot about this.

I've made a patch to fix the wheel filename, can you try this again when you have time:

python -m pip install git+https://github.com/jdber1/opendrop.git@issue42 --user

Thanks

Thank you. I have been able to install it and it runs well. But I have a little observation. First when the window opens with python -m opendrop, I noticed that upon further click to capture image and do analysis, a new window opens up but there is no way to close this window, if you want to go back except terminating it via terminal with CTRL+C. Please see attached pictures Screenshot from 2022-12-16 14-59-27 Screenshot from 2022-12-16 14-59-48

eugenhu commented 1 year ago

Ok great, thanks for all your help with testing.

I'll address the UI issue at a later time.

mcekwonu commented 1 year ago

Ok great, thanks for all your help with testing.

I'll address the UI issue at a later time.

Thank you for your effort. I would be expecting the resolution of the UI issue.

mcekwonu commented 1 year ago

Hi, I am sorry to bother you. I had some issues rejigging my python installations and now I have only python3.10 installed. I tried to reinstall opendrop using the last command on the issue: python -m pip install git+https://github.com/jdber1/opendrop.git@issue42 --user but It failed to install. I also tried using: python3 -m pip install git+https://github.com/jdber1/opendrop.git@issue42 --user. Installation also failed with the same error. Kindly see the error details below. Please could you help me resolve this problem. Thanks

Running command git checkout -b development --track origin/development Switched to a new branch 'development' Branch 'development' set up to track remote branch 'development' from 'origin'. error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [14 lines of output]

:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives Could not find glib-compile-resources Traceback (most recent call last): File "/home/mce/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/mce/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/mce/.local/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "/tmp/pip-req-build-7wccrf1y/build_backend/buildapi.py", line 12, in build_wheel subprocess.run(['scons', '-Q', 'bdist_wheel', '--build-dir=' + wheel_directory], check=True, env=env) File "/usr/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['scons', '-Q', 'bdist_wheel', '--build-dir=/tmp/pip-modern-metadata-zos8w5nt']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
eugenhu commented 1 year ago

Looks like glib-compile-resources is missing. Can you try installing libglib2.0-dev-bin with apt, and then try re-installing opendrop?

mcekwonu commented 1 year ago

Looks like glib-compile-resources is missing. Can you try installing libglib2.0-dev-bin with apt, and then try re-installing opendrop?

I have successfully installed it after installing the missing glib-compile-resources.... I used: python3 -m pip install git+https://github.com/jdber1/opendrop.git@issue42 --user.

Thank you for the support.

I want to suggest a slight modification to the package name probably "(opendrop-pendant)", so that it could host on pypi for direct install using pip and also differentiate it from opendrop package already hosted on pypi.

eugenhu commented 1 year ago

Yeah, sorry about the convoluted installation procedure, it's something we should improve.

mcekwonu commented 1 year ago

Yeah, sorry about the convoluted installation procedure, it's something we should improve.

It is okay. All the same thank you for the input and hardwork