Skip to content

Problems in importing the api after PyPI installation #133

Open

Description

@zvittorio

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

Activity

  1. DaneseAnna commented on Dec 9, 2022

    @DaneseAnna
    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

  2. zvittorio commented on Dec 9, 2022

    @zvittorio
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions