Coder Social home page Coder Social logo

pip install & ImportError about antspy HOT 5 CLOSED

antsx avatar antsx commented on July 16, 2024
pip install & ImportError

from antspy.

Comments (5)

stnava avatar stnava commented on July 16, 2024

did you try the more standard approach of

  • git clone https://github.com/ANTsX/ANTsPy.git
  • cd ANTsPy
  • python3 setup.py install

from antspy.

Borda avatar Borda commented on July 16, 2024

It does not help for installing on that particular server machine... I was instaling it on ma personal machine, and it works there... so it probably linked to the specific configuration, could it be?

from antspy.

stnava avatar stnava commented on July 16, 2024

Unclear if this can/will be addressed. Please reopen if needed.

from antspy.

muschellij2 avatar muschellij2 commented on July 16, 2024

Got the same issue/error. https://travis-ci.com/muschellij2/deepbleed/jobs/281243452#L7693. I think this may be due to the fact I forgot the ITKR (which builds a lib for ITK) was built on trusty. Trying on trusty now. Edit - that was not true - they were built on xenial and so was the build I refernced above.

from antspy.

wmdatah avatar wmdatah commented on July 16, 2024

The following attempts were made on a POWER 9, with nvidia tesla, running Ubuntu 22.04:

straight to bare metal

  • conda env (py3.9) + pip install antspyx (0.3.7 and 0.3.8)
  • git clone (a few different tags were tried) + python setup.py install

docker containers

  • nvidia/cuda:12.1.1-cudnn8-devel-ubi8
  • quay.io/rocketce/tensorflow:py39-rce180 (ubi8)
    on both: conda... + pip install... or git clone/setup.py

This is just a summary, I've been trying for a few days now, but today I gave up after trying with docker build and getting the exact same error as every other attempt:

ImportError: /opt/conda/lib/python3.10/site-packages/ants/lib/antsRegistration.cpython-310-powerpc64le-linux-gnu.so: undefined symbol: _Z14ANTSFileExistsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

In one of the attempts, in a container, I launched a
scanelf -s _Z14ANTSFileExistsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE -R / 2>/dev/null | grep _Z14ANT...
and I noticed that only other files in the same directory as antsRegistration.cpython-310-powerpc64le-linux-gnu.so have such a symbol. I haven't looked for such a symbol using other tools for other file types.

Could someone give me a hug to lessen my frustration? 😅 Or else shed some light on my ignorance? Any tip is worth. Thanks in advance.

Here is part of the docker build output:

Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-73-generic ppc64le)
...
  System information as of Tue Jun  6 04:06:40 PM -03 2023
...
git clone https://github.com/ANTsX/ANTsPy.git
cd ANTsPy
docker build -t antspy:master .
...
 => [internal] load build definition from Dockerfile
...
 => [stage-1 1/2] FROM docker.io/library/debian:bullseye-20230109-slim@sha256:98d3b4b0cee264301eb1354e0b549323af2d0633e1c43375d0b25c01826b6790
...
 => [builder 1/9] FROM docker.io/continuumio/miniconda3:22.11.1@sha256:10b38c9a8a51692838ce4517e8c74515499b68d58c8a2000d8a9df7f0f08fc5e
...
 => [internal] load build context
 => => transferring context: 105.30MB
 => [builder 2/9] RUN apt-get update && apt-get install -y --no-install-recommends apt-transport-https bash build-essential git libpng-dev
 => [builder 3/9] RUN conda install -c anaconda cmake
 => [builder 4/9] WORKDIR /usr/local/src
 => [builder 5/9] COPY environment.yml .
 => [builder 6/9] RUN conda env update -n base
 => [builder 7/9] COPY . .
 => [builder 8/9] RUN pip --no-cache-dir -v install .
 => ERROR [builder 9/9] RUN bash tests/run_tests.sh
------
 > [builder 9/9] RUN bash tests/run_tests.sh:
#0 0.415 /usr/local/src/tests /usr/local/src
#0 0.415 Running core tests
#0 1.720 Traceback (most recent call last):
#0 1.720   File "/usr/local/src/tests/test_core_ants_image.py", line 19, in <module>
#0 1.720     import ants
#0 1.720   File "/opt/conda/lib/python3.10/site-packages/ants/__init__.py", line 7, in <module>
#0 1.720     from .core import *
#0 1.720   File "/opt/conda/lib/python3.10/site-packages/ants/core/__init__.py", line 2, in <module>
#0 1.720     from .ants_image import *
#0 1.720   File "/opt/conda/lib/python3.10/site-packages/ants/core/ants_image.py", line 29, in <module>
#0 1.720     from .. import registration, segmentation, utils, viz
#0 1.720   File "/opt/conda/lib/python3.10/site-packages/ants/registration/__init__.py", line 3, in <module>
#0 1.720     from .affine_initializer import *
#0 1.720   File "/opt/conda/lib/python3.10/site-packages/ants/registration/affine_initializer.py", line 7, in <module>
#0 1.721     from .. import utils
#0 1.721   File "/opt/conda/lib/python3.10/site-packages/ants/utils/__init__.py", line 2, in <module>
#0 1.721     from .bias_correction import *
#0 1.721   File "/opt/conda/lib/python3.10/site-packages/ants/utils/bias_correction.py", line 4, in <module>
#0 1.721     from . import process_args as pargs
#0 1.721   File "/opt/conda/lib/python3.10/site-packages/ants/utils/process_args.py", line 14, in <module>
#0 1.721     from .. import lib
#0 1.721   File "/opt/conda/lib/python3.10/site-packages/ants/lib/__init__.py", line 44, in <module>
#0 1.721     from .antsRegistration import *
#0 1.721 ImportError: /opt/conda/lib/python3.10/site-packages/ants/lib/antsRegistration.cpython-310-powerpc64le-linux-gnu.so: undefined symbol: _Z14ANTSFileExistsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
------
Dockerfile:31
--------------------
  29 |     
  30 |     # run tests
  31 | >>> RUN bash tests/run_tests.sh
  32 |     
  33 |     # optimize layers
--------------------
ERROR: failed to solve: process "/bin/sh -c bash tests/run_tests.sh" did not complete successfully: exit code: 1

from antspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.