1

I have a following problem. I am using Spyder IDE (but no Anaconda). I want to install statsmodels.api. See my steps (I write them in IPython console):

1)

import statsmodels.api as sm

Traceback (most recent call last):

  File "<ipython-input-1-085740203b77>", line 1, in <module>
    import statsmodels.api as sm

ModuleNotFoundError: No module named 'statsmodels'
pip install statsmodels
Note: you may need to restart the kernel to use updated packages.
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Then I restart kernel using ctrl + . 3)

IPython 7.22.0 -- An enhanced Interactive Python.

Restarting kernel... 

But know, when I try step 1) again I see no progress. In other words, module is not installed.

4)

import statsmodels.api as sm
Traceback (most recent call last):

  File "<ipython-input-2-085740203b77>", line 1, in <module>
    import statsmodels.api as sm

ModuleNotFoundError: No module named 'statsmodels'

Where is the problem, please?

vojtam
  • 1,157
  • 9
  • 34

1 Answers1

1

Use !pip instead of pip in IPython console.

vojtam
  • 1,157
  • 9
  • 34