Let me know if it works, thanks Solution 8: conda create -n py27 python=2.7 ipykernel ("/usr/local/lib/python3.5/dist-packages") ('/usr/local/lib/python2.7/dist-packages') This path is skipped by Jupyter so pip won’t help.Īs a solution I suggest adding in the first block import sys The problem is that pyarrow is saved by pip into dist-packages (in your case /usr/local/lib/python2.7/dist-packages). In earlier versions, you need to use sys to fix the problem like in the answer by FlyingZebra1 import sys In IPython ( jupyter) 7.3 and later, there is a magic %pip and %conda command that will install into the current kernel (rather than into the instance of Python that launched the notebook). The ! tells the notebook to execute the cell as a shell command. So how can I permanently modify the path or tell pip where to install geocoder? How to solve the problem: Solution 1: ! pip install -user (‘/usr/local/lib/python2.7/dist-packages’) solves the problem for the current session. I also tried shutting down the notebook and restarting it without any luck.Įdit: I found that using the terminal installs the geocoder package in /home/ubuntu/.local/lib/python2.7/site-packages and using a notebook installs it in /usr/local/lib/python2.7/dist-packages which is not in the path. ImportError Traceback (most recent call last) Requirement already satisfied (use -upgrade to upgrade): decorator in /usr/local/lib/python2.7/dist-packages/decorator-4.0.10-py2.7.egg (from ratelim->geocoder) Requirement already satisfied (use -upgrade to upgrade): click in /usr/local/lib/python2.7/dist-packages (from geocoder) Requirement already satisfied (use -upgrade to upgrade): six in /usr/local/lib/python2.7/dist-packages (from geocoder) Requirement already satisfied (use -upgrade to upgrade): ratelim in /usr/local/lib/python2.7/dist-packages (from geocoder) Requirement already satisfied (use -upgrade to upgrade): requests in /usr/local/lib/python2.7/dist-packages (from geocoder) check the permissions and owner of that directory. The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. If executing pip with sudo, you may want sudo's -H flag. Please check the permissions and owner of that directory. The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Installing geocoder: !pip install geocoder 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 is not available when I try to import it. Question or problem about Python programming:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |