Installing a pip package from within a Jupyter Notebook not working

前端 未结 10 2114
无人及你
无人及你 2020-12-02 09:24

When I run !pip install geocoder in Jupyter Notebook I get the same output as running pip install geocoder in the terminal but the geocoder package

10条回答
  •  抹茶落季
    2020-12-02 09:36

    The problem is that pyarrow is saved by pip into dist-packages (in your case /usr/local/lib/python2.7/dist-packages). This path is skipped by Jupyter so pip won't help.

    As a solution I suggest adding in the first block

    import sys
    sys.path.append('/usr/local/lib/python2.7/dist-packages')
    

    or whatever is path or python version. In case of Python 3.5 this is

    import sys
    sys.path.append("/usr/local/lib/python3.5/dist-packages")
    

提交回复
热议问题