$ pip install nndownload
...
ModuleNotFoundError: No module named 'aiohttp'
...
Or
$ git clone git@github.com:AlexAplin/nndownload.git && cd nndownload
$ pip install .
...
ModuleNotFoundError: No module named 'aiohttp'
...
Cause
In setup.py file, to fetch version:
main_ns = {}
ver_path = convert_path("nndownload/nndownload.py")
with open(ver_path, encoding="utf8") as ver_file:
exec(ver_file.read(), main_ns)
It executes nndownload.py, which requires extra dependecies.
However, setup.py is executed in installing phase, when it can not ensure any extra packages have been installed.
Reproduction
Or
Cause
In
setup.py
file, to fetch version:It executes
nndownload.py
, which requires extra dependecies. However,setup.py
is executed in installing phase, when it can not ensure any extra packages have been installed.Suggestion
See #89