Почему сразу после установки Seaborn pip появляется ошибка атрибута - PullRequest
0 голосов
/ 19 сентября 2018

После новой установки Python 3.7 и всех необходимых модулей (например, numpy, scipy, matplotlib и т. Д.) Я успешно установил seaborn, но при попытке импортировать его в файл возникает ошибка атрибута.

Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\TestFile.py", line 1, in <module>
    import seaborn as sns
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\seaborn\__init__.py", line 6, in <module>
    from .rcmod import *
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\seaborn\rcmod.py", line 5, in <module>
    from . import palettes, _orig_rc_params
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\seaborn\palettes.py", line 12, in <module>
    from .utils import desaturate, set_hls_values, get_color_cycle
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\seaborn\utils.py", line 7, in <module>
    from scipy import stats
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\scipy\stats\__init__.py", line 345, in <module>
    from .stats import *
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\scipy\stats\stats.py", line 171, in <module>
    from . import distributions
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\scipy\stats\distributions.py", line 13, in <module>
    from . import _continuous_distns
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\scipy\stats\_continuous_distns.py", line 113, in <module>
    class norm_gen(rv_continuous):
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\scipy\stats\_continuous_distns.py", line 175, in norm_gen
    `optimizer` argument is ignored.\n\n""")
  File "C:\Program Files (x86)\Python37-32\lib\site-packages\scipy\misc\doccer.py", line 159, in _doc
    start_of_notes = cls_docstring.find(notes_header)
AttributeError: 'NoneType' object has no attribute 'find'

Он также не отображается в списке пунктов.

C:\Program Files (x86)\Python37-32>python -m pip install seaborn --force-reinstall
Installing collected packages: numpy, pyparsing, six, cycler, setuptools, kiwisolver, python-dateutil, matplotlib, scipy, pytz, pandas, seaborn
Successfully installed cycler-0.10.0 kiwisolver-1.0.1 matplotlib-3.0.0 numpy-1.15.1 pandas-0.23.4 pyparsing-2.2.1 python-dateutil-2.7.3 pytz-2018.5 scipy-1.1.0 seaborn-0.9.0 setuptools-40.4.1 six-1.11.0

C:\Program Files (x86)\Python37-32>pip list
Package         Version
--------------- -------
cycler          0.10.0
kiwisolver      1.0.1
llvmlite        0.24.0
matplotlib      2.2.2
numba           0.39.0
numpy           1.14.5
pandas          0.23.4
pip             18.0
pyparsing       2.2.0
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      39.0.1
six             1.11.0
...