3

I am trying to install the python submodule ANCA in my mac, for which I have run the following:

pip install git+https://github.com/acadev/anca.git

getting the following:

. . .

Installing collected packages: anca
Running setup.py install for anca ... done
Successfully installed anca-0.1.5

I have miniconda installed in my computer, and I have checked that the module and its files and dependencies are correctly located in /usr/local/miniconda2/lib/python2.7/site-packages/anca

When I import anca in my notebook it does not give me any error, but if I try to import a submodule it gives me the following error:

from anca import  IterativeMeansAlign

ImportError: cannot import name IterativeMeansAlign

It is the same with other submodules, but all of them are apparently well installed with all their files.

I have also tried to install the package using Git:

git clone https://github.com/acadev/anca.git

sudo python setup.py install

with the same result.

Note: 'locate' is not able to locate the module anca unlike the rest of the python modules although I can see all the files in the right location. It is the first time this happens to me.

Thanks a lot for your help, any suggestion will be very appreciated.

0TTT0
  • 1,288
  • 1
  • 13
  • 23
Rachael
  • 285
  • 3
  • 17
  • 1
    Maybe you should've installed with `conda` instead of `pip`. – cs95 Oct 16 '17 at 23:47
  • 1
    How? I haven't found the way. Please tell me how because I have looked for it so bad. – Rachael Oct 16 '17 at 23:51
  • `conda install .....` and then run python through conda and try importing it. See here for details: https://stackoverflow.com/q/32814361/4909087 – cs95 Oct 16 '17 at 23:53
  • 1
    Conda does not install from source, I have read that conda build supports recipes built from git, but I don't know how to do it. If you can tell me it would be very appreciated. – Rachael Oct 16 '17 at 23:59
  • Sorry, my knowledge of conda is very surface level. I hope someone who knows the answer sees this question. – cs95 Oct 17 '17 at 00:00
  • 1
    Try `import anca.align.IterativeMeansAlign` or `from anca.align import IterativeMeansAlign`. – ElpieKay Oct 17 '17 at 01:47
  • Hi, Thanks a lot for your help, i am still getting an error message:NameError: name '_' is not defined – Rachael Oct 17 '17 at 11:02
  • I have a similar problem [here](https://stackoverflow.com/questions/54490717/submodule-import-not-working-on-google-colab) and no clues how to solve it yet – Evgeny Feb 02 '19 at 07:33
  • Could be [this](https://stackoverflow.com/questions/45087711/python-installing-package-with-submodules) - package discovery in setup.py – Evgeny Feb 02 '19 at 07:35

0 Answers0