ImportError: cannot import name 'getargspec'
See original GitHub issueI cannot import the package, have the following error message:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-54-1140326dc452> in <module>()
----> 1 from ggplot import *
~/anaconda/lib/python3.6/site-packages/ggplot/__init__.py in <module>()
18
19 from .geoms import geom_area, geom_blank, geom_boxplot, geom_line, geom_point, geom_jitter, geom_histogram, geom_density, geom_hline, geom_vline, geom_bar, geom_abline, geom_tile, geom_rect, geom_bin2d, geom_step, geom_text, geom_path, geom_ribbon, geom_now_its_art, geom_violin, geom_errorbar, geom_polygon
---> 20 from .stats import stat_smooth, stat_density
21
22 from .facets import facet_wrap, facet_grid, Facet
~/anaconda/lib/python3.6/site-packages/ggplot/stats/__init__.py in <module>()
1 from .stat_density import stat_density
----> 2 from .stat_smooth import stat_smooth
~/anaconda/lib/python3.6/site-packages/ggplot/stats/stat_smooth.py in <module>()
3
4 from ..geoms.geom import geom
----> 5 from . import smoothers
6 from ..utils import is_date
7
~/anaconda/lib/python3.6/site-packages/ggplot/stats/smoothers.py in <module>()
4 from pandas.lib import Timestamp
5 import pandas as pd
----> 6 import statsmodels.api as sm
7 from statsmodels.nonparametric.smoothers_lowess import lowess as smlowess
8 from statsmodels.sandbox.regression.predstd import wls_prediction_std
~/anaconda/lib/python3.6/site-packages/statsmodels/api.py in <module>()
3 from . import tools
4 from .tools.tools import add_constant, categorical
----> 5 from . import regression
6 from .regression.linear_model import OLS, GLS, WLS, GLSAR
7 from .regression.recursive_ls import RecursiveLS
~/anaconda/lib/python3.6/site-packages/statsmodels/regression/__init__.py in <module>()
----> 1 from .linear_model import yule_walker
2
3 from statsmodels import NoseWrapper as Tester
4 test = Tester().test
~/anaconda/lib/python3.6/site-packages/statsmodels/regression/linear_model.py in <module>()
51 cache_readonly,
52 cache_writable)
---> 53 import statsmodels.base.model as base
54 import statsmodels.base.wrapper as wrap
55 from statsmodels.emplike.elregress import _ELRegOpts
~/anaconda/lib/python3.6/site-packages/statsmodels/base/model.py in <module>()
8 from statsmodels.stats.contrast import ContrastResults, WaldTestResults
9 from statsmodels.tools.decorators import resettable_cache, cache_readonly
---> 10 import statsmodels.base.wrapper as wrap
11 from statsmodels.tools.numdiff import approx_fprime
12 from statsmodels.tools.sm_exceptions import ValueWarning, \
~/anaconda/lib/python3.6/site-packages/statsmodels/base/wrapper.py in <module>()
3
4 import numpy as np
----> 5 from statsmodels.compat.python import get_function_name, iteritems, getargspec
6
7 class ResultsWrapper(object):
ImportError: cannot import name 'getargspec'
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
Python 3.11 ImportError: cannot import name 'getargspec' from ...
I face the same error. Unable to import from web3 and gives this error message. Using python 3.11 as well.
Read more >ImportError: cannot import name 'getargspec' from 'inspect' (C ...
Either depreciate python. or go to python3.11/site-packages/parsimonious/expressions.py and replace getargspec with getfullargspec.
Read more >ImportError: cannot import name getargspec - Hail Discussion
The author of the decorator module pushed a new version to PyPI a few days ago which removed ... ImportError: cannot import name...
Read more >2021856 – python-bottle fails to build with Python 3.11
Bug 2021856 - python-bottle fails to build with Python 3.11: ImportError: cannot import name 'getargspec' from 'inspect'.
Read more >importerror cannot import name 'getargspec, importerror cannot ...
importerror cannot import name 'getargspec. inspect.getmodulename (path) ¶ Return the name of the module named by the file path, without including the names ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
EDIT: solved by restarting kernel 😃
Piling on here 😃
Ran
pip install statsmodels --upgrade
; then,from statsmodels.stats.outliers_influence import variance_inflation_factor
in both command line and jupyter notebook… runs in python, but not in jupyter notebook…I also encountered the same issue. I did the upgrade as suggested above. However, I still have the same error. I am using Jupyter notebook with Python 2.0 on a mac. Any suggestion? Thanks in advance.