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

Problems in importing the api after PyPI installation #133

Open
zvittorio opened this issue Dec 9, 2022 · 2 comments
Open

Problems in importing the api after PyPI installation #133

zvittorio opened this issue Dec 9, 2022 · 2 comments

Comments

@zvittorio
Copy link

Hello epiScanpy team,

First of all thanks for the great library!
I've just downloaded locally episcanpy with PyPI

pip install episcanpy

and I tried to import in a jupyter notebook

import episcanpy.api as epi

But I get the error:

ImportError                               Traceback (most recent call last)
Untitled-1.ipynb Cell 4 in <cell line: 5>()
      [3] import numpy as np
      [4] import pandas as pd
----> [5] import episcanpy.api as epi

File ~/my/path/to/python3.8/episcanpy/api/__init__.py:11, in <module>
      9 from . import tl
     10 from . import ct
---> 11 from . import pl
     13 from typing import Any, Union, Optional, Iterable, TextIO
     14 from typing import Tuple, List, ContextManager

File ~/my/path/to/python3.8/episcanpy/api/pl.py:20, in <module>
     18 from ..preprocessing._quality_control import cal_var, variability_features
     19 from ..preprocessing._tss_enrichment import tss_enrichment_plot as tss_enrichment
---> 20 from ..preprocessing._tss_enrichment import tss_enrichment_score_plot as tss_enrichment_socre

ImportError: cannot import name 'tss_enrichment_score_plot' from 'episcanpy.preprocessing._tss_enrichment' (/home/my/path/to/python3.8/episcanpy/preprocessing/_tss_enrichment.py)

and as you can see in line 20 of the file pl.py there is a typo "tss_enrichment_SOCRE" instead of "tss_enrichment_score" I guess.
I thought this would fix the ImportError, but there is more apparently.

Then tried the fix suggested in #130 and this apparently solves the ImportError.
But it looks like the user made a pull request that was also merged, so I am wondering why the fix was not part of the library download from PyPI.

Thanks for your help!

Vittorio

@DaneseAnna
Copy link
Collaborator

Thank you for reporting this issue. The api import is no longer maintained.
If you import episcanpy as : import episcanpy as epi you should be fine.

For a more recent and complete tutorial, please check the following link : https://drive.google.com/drive/folders/1lEOSfLKyxGznjB5-UF5-0KLwvx7tU5Ot?usp=sharing
(the website isn't up to date)

Best,
Anna

@zvittorio
Copy link
Author

Thanks a lot!
I will refer to the more recent tutorial then.

Best,
Vittorio

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