@@ -45,4 +45,43 @@ Please install PyOWM 2.10 with:
4545pip2 install pyowm==2.10
4646```
4747
48- And find the PyOWM 2.10 documentation [ here] ( https://pyowm.readthedocs.io/en/2.10/ )
48+ And find the PyOWM 2.10 documentation [ here] ( https://pyowm.readthedocs.io/en/2.10/ )
49+
50+
51+ ## ModuleNotFound error upon installing PyOWM development branch from Github
52+
53+ Installation of the (potentially unstable) development trunk used to be like this:
54+
55+ ``` shell
56+ $ pip install git+https://github.com/csparpa/pyowm.git@develop
57+ ```
58+
59+ You would get something like:
60+
61+ ``` shell
62+ Collecting git+https://github.com/csparpa/pyowm.git@develop
63+ Cloning https://github.com/csparpa/pyowm.git (to revision develop) to /tmp/pip-req-build-_86bl7ty
64+ [......]
65+ ERROR: Command errored out with exit status 1:
66+ command: /home/me/.local/share/virtualenvs/backend-nPPHZqlJ/bin/python -c ' import sys, setuptools, tokenize; sys.argv[0] = ' " '" ' /tmp/pip-req-build-_86bl7ty/setup.py' " '" ' ; __file__=' " '" ' /tmp/pip-req-build-_86bl7ty/setup.py' " '" ' ;f=getattr(tokenize, ' " '" ' open' " '" ' , open)(__file__);code=f.read().replace(' " '" ' \r\n' " '" ' , ' " '" ' \n' " '" ' );f.close();exec(compile(code, __file__, ' " '" ' exec' " '" ' ))' egg_info --egg-base /tmp/pip-pip-egg-info-ww_gs9y3
67+ cwd: /tmp/pip-req-build-_86bl7ty/
68+ Complete output (17 lines):
69+ Traceback (most recent call last):
70+ [......]
71+ File " /tmp/pip-req-build-_86bl7ty/pyowm/commons/tile.py" , line 6, in < module>
72+ from pyowm.utils.geo import Polygon
73+ File " /tmp/pip-req-build-_86bl7ty/pyowm/utils/geo.py" , line 4, in < module>
74+ import geojson
75+ ModuleNotFoundError: No module named ' geojson'
76+ ----------------------------------------
77+ ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
78+ ```
79+
80+ I've realized this way of installing is bad * as it does not install PyOWM's dependencies** along.
81+ Therefore the right way to go is:
82+
83+ ``` shell
84+ $ git clone https://github.com/csparpa/pyowm.git
85+ $ cd pyowm && git checkout develop
86+ $ pip install -r requirements.txt && python setup.py install
87+ ```
0 commit comments