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

singularity_index is not available #7

Open
GustavoWillyNagel opened this issue Feb 16, 2022 · 6 comments
Open

singularity_index is not available #7

GustavoWillyNagel opened this issue Feb 16, 2022 · 6 comments

Comments

@GustavoWillyNagel
Copy link

Hi.

I am trying to use the RivaMap for my P.h.D project. However, the necessary function "singularity_index" seems to not be available in the package. Am I doing something wrong?

The functions available are shown below.

dir(rivamap)
['builtins',
'cached',
'doc',
'file',
'loader',
'name',
'package',
'path',
'spec',
'delineate',
'georef',
'preprocess',
'visualization']

Thank you in advance.

Best wishes.

@elbeejay
Copy link
Contributor

Hi @GustavoWillyNagel - how are you installing the package? The structure of the repository has not changed since the project's inception so I suspect this issue has to do with how you are installing rivamap or setting up your local programming environment.

@GustavoWillyNagel
Copy link
Author

Hi Hariharan.

I tried different ways of installing the package (see below), all with the same issue. I am using the Google Colab.

1º) ! sudo pip install rivamap

2º) ! git clone https://github.com/isikdogan/rivamap.git
! sudo python setup.py install

3º) !pip install rivamap

@elbeejay
Copy link
Contributor

Your problem may be that dir does not always provide a complete list of submodules (https://stackoverflow.com/questions/48000761/list-submodules-of-a-python-module). I've tried installing via your step 2 (so the git clone route on colab and was able to install everything.

Inspired by that stackoverflow post, I entered the following into colab after installation:

import rivamap
from pkgutil import iter_modules

def list_submodules(module):
    for submodule in iter_modules(module.__path__):
        print(submodule.name)

list_submodules(rivamap)

Output was the following:

delineate
georef
preprocess
singularity_index
visualization

So it looks like everything is there.

@GustavoWillyNagel
Copy link
Author

Your problem may be that dir does not always provide a complete list of submodules (https://stackoverflow.com/questions/48000761/list-submodules-of-a-python-module). I've tried installing via your step 2 (so the git clone route on colab and was able to install everything.

Inspired by that stackoverflow post, I entered the following into colab after installation:

import rivamap
from pkgutil import iter_modules

def list_submodules(module):
    for submodule in iter_modules(module.__path__):
        print(submodule.name)

list_submodules(rivamap)

Output was the following:

delineate
georef
preprocess
singularity_index
visualization

So it looks like everything is there.

Thank you very much.

It worked!!

Do you know do I import this submodule?

@elbeejay
Copy link
Contributor

Do you know do I import this submodule?

Should be able to do either from rivamap import singularity_index or import rivamap.singularity_index as singularity_index just like any other Python submodule.

@GustavoWillyNagel
Copy link
Author

Thank you very much.

The import did not work, but I created a package myself with the code provided.

Best wishes.

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

2 participants