Skip to content
Advertisement

Error installing the linearmodels package on Jupyter notebook

I am trying to install the linearmodels package on Jupyter notebook using the following code:

pip install linearmodels

but I am getting the following error message:

      File "<ipython-input-47-dc9347e29b91>", line 1
    pip install linear models
              ^
SyntaxError: invalid syntax

Can you anyone please help me with this?

After installing the linearmodels package I’ll be importing a two-stage instrumental variables regression:

from linearmodels.iv import IV2SLS

Advertisement

Answer

To install packages for Jupyter notebooks there are a couple of ways of approaching it. One way is to pip install from the terminal.

The other (proper) way is to use Conda install as explained here – updated link 21-Sep-2019

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement