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

Import failure #135

Closed
jjgecon opened this issue Jun 25, 2024 · 4 comments
Closed

Import failure #135

jjgecon opened this issue Jun 25, 2024 · 4 comments

Comments

@jjgecon
Copy link

jjgecon commented Jun 25, 2024

Descrioption

I tried to import the package and get an error

import scattertext as st

and get the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[50], line 2
      1 # Let's use the scatter text thingy
----> 2 import scattertext as st

File ~/miniforge3/envs/econ_geo/lib/python3.11/site-packages/scattertext/__init__.py:165
    163 from scattertext.TermDocMatrixWithoutCategories import TermDocMatrixWithoutCategories
    164 from scattertext.termranking.TermRanker import TermRanker
--> 165 from scattertext.continuous.trend_plot import TrendPlotSettings, DispersionPlotSettings, CorrelationPlotSettings, \
    166     TimePlotSettings, TimePlotPositioner
    167 from scattertext import SampleCorpora
    168 from scattertext import termscoring

File ~/miniforge3/envs/econ_geo/lib/python3.11/site-packages/scattertext/continuous/trend_plot.py:15
     13 from scattertext.termranking.TermRanker import TermRanker
     14 from scattertext.TermDocMatrix import TermDocMatrix
---> 15 from scattertext.Scalers import get_scaler_name, scale_center_zero_abs, scale, dense_rank
     16 from scattertext.smoothing.mean_isotonic import MeanIsotonic
     19 @dataclasses.dataclass
     20 class TrendPlotPresets:

ImportError: cannot import name 'get_scaler_name' from 'scattertext.Scalers' (/miniforge3/envs/econ_geo/lib/python3.11/site-packages/scattertext/Scalers.py)

I'm not really sure if there is a conflict of names or documents. I have no other files in the workspace with scattertext names.

Environment

  • Scattertext version (v0.1.19):
  • OS (e.g., Linux): MacOS
  • How you installed Scattertext: installed using pip and forcing v0.1.19
  • Initial install command: pip install scattertext it just installs v0.1.10
  • Forced install command pip install -Iv scattertext==0.1.19
  • Python version: 3.11.9
  • I have also tried installing: the packages jieba, spacy, empath, astropy, flashtext, gensim and umap-learn.
@JasonKessler
Copy link
Owner

JasonKessler commented Jun 25, 2024 via email

@jjgecon
Copy link
Author

jjgecon commented Jun 25, 2024

using the pip installer I could only access the 0.1.19 version.

@JasonKessler
Copy link
Owner

JasonKessler commented Jun 25, 2024 via email

@jjgecon
Copy link
Author

jjgecon commented Jun 25, 2024

It upgraded to 0.2.1 (not sure how this worked now and not when I tried it earlier)

Thanks for the help ;D

@jjgecon jjgecon closed this as completed Jun 25, 2024
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