How to install a Python package from within IPython?

后端 未结 5 1272
遥遥无期
遥遥无期 2020-11-27 14:01

I wonder if it\'s possible to install python packages without leaving the IPython shell.

5条回答
  •  误落风尘
    2020-11-27 15:00

    import pip
    pip.main(['install', 'package_name'])
    

    The above shell-based answers don't work unless pip is in your $PATH (e.g. on Windows).

提交回复
热议问题