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

No module named 'inkid.data.volume' #1

Open
amiled17 opened this issue Apr 8, 2023 · 3 comments
Open

No module named 'inkid.data.volume' #1

amiled17 opened this issue Apr 8, 2023 · 3 comments

Comments

@amiled17
Copy link

amiled17 commented Apr 8, 2023

I'm following install guide, when i put
import inkid
there is an error:
ModuleNotFoundError: No module named 'inkid.data.volume'
python version:3.10.9
Thanks for help

@stephenrparsons
Copy link
Member

Did you install via PyPI, or from local source? Could you share the commands you are running that get you to this situation?

It is possible you need to build the Cython modules by running python setup.py build_ext --inplace.

@amiled17
Copy link
Author

I tried both methods. the command :
python setup.py build_ext --inplace
throws error:
Compiling inkid/data/volume.pyx because it changed.
Compiling inkid/data/mathutils.pyx because it changed.
[1/2] Cythonizing inkid/data/mathutils.pyx
[2/2] Cythonizing inkid/data/volume.pyx
running build_ext
building 'inkid.data.volume' extension
creating build
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/inkid
creating build/temp.linux-x86_64-3.10/inkid/data
gcc -pthread -B /opt/conda/envs/.venv/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/envs/.venv/include -fPIC -O2 -isystem /opt/conda/envs/.venv/include -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/opt/conda/envs/.venv/lib/python3.10/site-packages/numpy/core/include -I/opt/conda/envs/.venv/include/python3.10 -c inkid/data/volume.c -o build/temp.linux-x86_64-3.10/inkid/data/volume.o
inkid/data/volume.c: In function ‘__pyx_f_5inkid_4data_6volume_6Volume_get_subvolume_snap_to_axis_aligned’:
inkid/data/volume.c:7363:62: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘dimensions’
7363 | __pyx_t_3 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_subvolume->dimensions[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error)
| ^~
inkid/data/volume.c:7385:62: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘dimensions’
7385 | __pyx_t_4 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_subvolume->dimensions[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error)
| ^~
inkid/data/volume.c:7407:62: error: ‘PyArrayObject’ {aka ‘struct tagPyArrayObject’} has no member named ‘dimensions’
7407 | __pyx_t_3 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_subvolume->dimensions[2])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error)
| ^~
error: command '/usr/bin/gcc' failed with exit code 1

@csparker247
Copy link
Member

Try the steps for building from source, but edit setup.py to remove the define_macros line here. That may help, though if it does, it's probably more of a stop gap than a solution.

For what it's worth, I just did a clean install using venv (not conda) and had no issues:

python3.10 -m venv venv
source venv/bin/activate
python -m pip install -U pip
python -m pip install inkid
python -c 'import inkid; print(inkid.data.volume.__name__)'

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

3 participants